> map.connect ":mls", :controller => "property",
:action => "detail", :id
> => Property.find_by_mls(:mls).id.to_s
>
> Is this possible? I don''t know how to pick up the params passed to
a
> page at this early stage of the request life-cycle.
Why do you need to do that here? Why not just:
map.connect ":mls" :controller => "property", :action
=> "detail"
and then :
class PropertyController < ....
def detail
unless params[:mls].blank? then
@property = Property.find_by_mls(:mls)
end
if @property.nil? then
# find the property using some other method...
end
end
end
I''m assuming of course that the goal is to get the property object with
the given MLS string...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---