Displaying 7 results from an estimated 7 matches for "find_all_bi".
Did you mean:
find_all_by
2008 Mar 04
6
find_all_by deprecated?
Is find_all_by deprecated and/or find_first_by for 2.0.2? If not,
what is actually deprecated? just find_all(..) and find_first()?
Thanks for clearing this up.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2009 Jul 16
12
Find_all_by and find(:all) to only select certain values for a selection box
So....let''s have a look if I understood the issue:
-Find_all_by is actually the same like Find(:all), however Find_all_by
is much shorter and less complicated than the syntax of Find(:all)
-So in my CONTROLLER it says @files = find(:all) however I don''t want
to see all files displayed in my selection box, because I only want to
see the foles whose mandant_id is the same like
2005 Apr 20
7
find_all_by and :order
I think I must be missing something obvious...
I have...
class OrderController < ApplicationController
model :order
scaffold :order
def list
@orders = Order.find_all_by_status(@params[:status], :order => "date" )
end
end
class Order < ActiveRecord::Base
belongs_to :customer
end
and i''m getting...
/Unknown column ''orderdate'' in
2007 Oct 07
22
Differences in execution between console and app
class AppointmentBook < ActiveRecord::Base
has_many :appointments
def lookup(date, look_ahead = 27)
return nil unless block_given?
(date..date + look_ahead).each do |date|
yield(date, appointments.find_all_by_date(date))
end
end
end
The line with yield is throwing the error:
undefined method ''each'' for #<Date: 4908761/2,0,2299161>
A YAML
2006 Sep 09
1
options_from_collection_for_select
I''ve looked at the API on this but can''t quite see what I''m missing from my call
<select id="pay[pay_id] name="pay[pay_id]">
<%= options_from_collection_for_select(
Pay.find_all_by_name, "id", "name") %> #<- line 5
</select>
is returning -
Showing app/views/kr/index.rhtml where line #5 raised:
wrong number
2008 Feb 21
7
looping through a list
what is the proper way to loop through a list in a rails view (assuming
that you need to check if it is empty or not)
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2008 May 22
9
Retrieving Mutliple Records using find_by_*
I was hoping that AR''s find_by_* magic methods would help me retrieve
multiple items somewhat like the following:
names_to_find = [''Larry'', ''Moe'', ''Curly'']
found_people = Person.find_by_name(names_to_find)
Is there a way to accomplish this using find_by_* (or even find(:all)
using some sort of conditions) or must I resort to SQL