On Oct 9, 5:24 pm, wbr <[email protected]> wrote:
> ... and I'm not in a position to change how the controller works or
> redefine the expected incoming parameters.
>
> Thoughts or suggestions or workarounds?
>
Get a new gig. Seriously, any place that ties your hands like this
isn't worth putting up with.
If you're really set on working with the "can't modify the controller
but can change routes.rb" system, a truly sneaky dev could re-open the
controller at the bottom of routes.rb (it's loaded with 'load', so you
can whack any code in there) and do something like this:
class SearchController
before_filter :munge_params
def munge_params
params[:program][:leader_id] = params[:leader_id] unless params
[:leader_id].blank?
end
end
But don't do that. Either you're a developer or not - fencing off bits
of the app doesn't make any sense.
--Matt Jones
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---