This moves the checkedout? method to the Rentable superclass, so that it
is available from both the Video and Game classes.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
validates_presence_of :game_genre
validates_presence_of :platform
validates_presence_of :game_genre
validates_presence_of :platform
- def checkedout?
- return Coitem.find_by_id(self.id) ? true : false
- end
validates_presence_of :title
# don't validate newrelease, false is ok
validates_presence_of :title
# don't validate newrelease, false is ok
+
+ def checkedout?
+ return Coitem.find_by_rentable_id(self.id) ? true : false
+ end