Displaying 3 results from an estimated 3 matches for "mod_id".
Did you mean:
mo_id
2006 Jul 13
5
Relationships: one model referencing same table for different data sets?
Hi,
After I''ve saved, I want to display the Description from the Codes table that
corresponds with the ID in the Cause table.
Rails doesn''t seem to like that, because on my form, I have two sets of data in
combo boxes that come from the Codes table. So, in the show template, I can''t
do this:
Cause of Death: <%= @cause.code.description %>
Any ideas?
The
2007 May 04
5
Something wierd with .save method
...ecords in the db as the selected
checkboxes (named :isselected) in the view.
Here is the code snippet from the controller:
isselectedhash = params[:isselected]
for mod in isselectedhash.keys
@issue = Issue.new(params[:issue])
@issue.state = ''NEW''
@issue.mod_id = isselectedhash[mod] # this gets the mod_id
logger.warn("saving ....")
logger.warn(@issue)
@issue.save
end
When I have two boxes selected this loop goes thru twice, but only
one record is created in the DB.
Here is the log,. Note, no SQL for the second object...
2006 Jul 10
9
ROR questions
Hi,
?
I''m a Ruby on Rails newbie.? I''ve been tasked with building our office''s first ROR application, and I am the only one working on it, so I am muddling through with a couple of books...? Moving along slowly but need some discussion time with some people who KNOW it and can maybe offer some answers to questions I haven''t found in my books.
?
First - what is