search for: find_all_by_act

Displaying 3 results from an estimated 3 matches for "find_all_by_act".

2006 Aug 16
3
calculate method is gone once I use ''find''?
Could someone please explain why this works: current_user.accounts.sum(:balance) But not this: current_user.accounts.find_all_by_active(true).sum(:balance) For the latter Rails tells me sum is an undefined method. It seems like I lose the ActiveRecord methods when I call ''find''? This (simpler) does not work either: current_user.accounts.find_all.sum(:balance) Thanks! -- Posted via http://www.ruby-forum.c...
2008 Aug 31
6
why's my course_duration being reset
...@enquiries = Enquiry.find(:all, :order => ''requested_start_date ASC'') end def list_not_responded # @enquiries = Enquiry.find(:all, :conditions => ''responded = null'', :order => ''requested_start_date ASC'') # entity = MyEntity.find_all_by_active(true) @enquiries = Enquiry.find_all_by_responded(false) end def show @enquiry = Enquiry.find(params[:id]) end def new @enquiry = Enquiry.new @courses = Course.active_courses @accomodations = Accomodation.active_accomodation # @enquiry.course_booking_fee = Cour...
2006 Apr 04
9
Does ActiveRecord have support for "Boolean" columns?
Hey all -- I''ve been using enumerable char(1)''s with ''y'' and ''n'' values for my Boolean columns in Rails, but it strikes me there should be a better way. How do you setup columns that represent true/false-ness in your schemas on Rails? Wondering what kind of standard approaches there are other than me writing something like class MyEntity