search for: edition_of_work

Displaying 1 result from an estimated 1 matches for "edition_of_work".

Did you mean: edition_of_works
2006 Aug 14
1
Calling a method in console
I''m using the Ruby for Rails book and have all the code done and application works. However I''d like to access some of the methods through script/console. For example in the edition model file (below) I''d like to know how to call either the "Edition_of_Works" or composers methods: class Edition < ActiveRecord::Base has_and_belongs_to_many :works has_many :orders belongs_to :publisher def Edition.of_works(works) works.map {|work| work.editions }.flatten.uniq end def composers works.map {|work| work.composer }.uniq e...