Displaying 3 results from an estimated 3 matches for "term_id".
Did you mean:
team_id
2006 May 23
5
AR Caching and Reflection
When I do this:
term = Term.find(1, :include => :definition)
term.definition.term
Two SQL queries are fired, why?
--
Posted via http://www.ruby-forum.com/.
2006 Aug 02
1
ActiveRecord: find_or_create with has_and_belongs_to_many --
...llowing:
term = school.terms.find_or_create_by_code("FALL06")
the queries in the log show the expected SELECT statement to query if
there is a join table record between the school and term with code
"FALL06":
SELECT * FROM term
INNER JOIN school_term ON term.id = school_term.term_id
WHERE (school_term.school_id = 1 )
AND (term.`code` = ''FALL06'' )
LIMIT 1
but the INSERT behavior does not include a join table insert if the
SELECT does not find an appropriate record:
INSERT INTO term (`code`, `name_full`, `name_common`, `date_end`,
`date_start`)
VALUES('...
2006 Oct 12
3
Help with observer_form , javascript error
...<select name=position[state_id][] size = "4" multiple = "multiple" id =
''stat''><%=
options_from_collection_for_select @states, :id, :name
%></select></fieldset>
<fieldset><legend>Terms</legend>
<select name=position[term_id][] size = "4" multiple = "multiple" id =
''term''><%=
options_from_collection_for_select @terms, :id, :name %></select></fieldset>
<fieldset><legend>Title</legend>
<input type="text" id="title" name=...