I have just updated to rails 1.2.
before this I could have pass an array of object through link_to however
now this is not working anymore. Any help is very appreciated.
Here is my code:
Controller:
def show_matrix @member_studies = []
unless params[:member_studies].nil?
params[:member_studies].each do |ms| @member_study = MemberStudy.find_by_id(ms) @member_studies << @member_study
end
end
end
My @member_studies is returning NULL even though there are two records
in my database.
I have just updated to rails 1.2.
before this I could have pass an array of object through link_to however
now this is not working anymore. Any help is very appreciated.
Here is my code:
development.log should show the contents of params[], are they showing
up there?
I have just updated to rails 1.2.
before this I could have pass an array of object through link_to however
now this is not working anymore. Any help is very appreciated.
Here is my code:
development.log should show the contents of params[], are they showing
up there?
I have just updated to rails 1.2.
before this I could have pass an array of object through link_to however
now this is not working anymore. Any help is very appreciated.
Here is my code:
</pre>
</blockquote>
<pre wrap="">development.log should show the contents of params[],
Thanks for your reply.
the value that is passed to my controller (show_matrix) is:
Parameters:
{“member_studies”=>“#<MemberStudy:0x496d5f8>/#<MemberStudy:0x496c590>”}
However before I would have had this one:
{member_studies[]=5&member_studies[]=12}
I wonder I can change the code to get an array again.
Any help is greately appreciated
Check out Rails Ticket #7047. It sounds like your problem.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected] To
unsubscribe from this group, send email to
[email protected] For more options,
visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---