search for: fill_empty

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

Did you mean: still_empty
2007 Aug 02
7
has_many and class function
Hello, i have two models : class Container < ActiveRecord::Base has_many :bottles end class Bottle < ActiveRecord::Base belongs_to :container def self.find_all_from_container(container) container.bottles.find(:all) end end i was asking myself if there was a better way to write the function find_all_from_container : i can call it from an instance of Container but