perhaps an academic question:
i have this:
 <%= link_to_remote n,
:url=>people_url({:div_to_update=>"people_container",:organisation_id=>@organisation.id,:partial=>"list_row",:page=>n}),:method=>:get
%>
as you can see in the parameter hash there is an organisation_id, but
sometimes this value is not present, so there is no @organisation
instance variable.
I noticed that rails doesn''t bother, it just ignores this one in the
url
parameters it creates
Do you think it is ok to rely on the framework for checking these kind
of things or should i check it myself before calling this method?
i know it works, but perhaps this is not so beautifull
-- 
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
> perhaps an academic question: > > i have this: > > <%= link_to_remote n, > :url=>people_url({:div_to_update=>"people_container",:organisation_id=>@organisation.id,:partial=>"list_row",:page=>n}),:method=>:get > %> > > as you can see in the parameter hash there is an organisation_id, but > sometimes this value is not present, so there is no @organisation > instance variable. > > I noticed that rails doesn''t bother, it just ignores this one in the url > parameters it creates > > Do you think it is ok to rely on the framework for checking these kind > of things or should i check it myself before calling this method? > > i know it works, but perhaps this is not so beautifullDon''t do that... You sure that it''s not setting it? Or is it setting it to the same result as "nil.id" ? Might want to double check that. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---