Hello Railers, Seems people are finding the direct dispatching method calling counter-intuitive (i.e. having to use @params or @method_params to get at the method parameters). So I''ve made a change [1] in trunk, that will let you use def mymethod(param1, param2, param3) end In your controllers. Its backwards compatible though, so all your existing code will still work, if you haven''t declared it. It''ll be a lot cleaner and consistent with the other dispatching modes if you switch to this convention though (not sure why I didn''t make it The Way from the start :P). I''m thinking of deprecating the old style (@params[''name'']) for removal by 1.0. Regards, Leon [1] http://dev.rubyonrails.com/changeset/992
> Seems people are finding the direct dispatching method calling > counter-intuitive (i.e. having to use @params or @method_params to get > at the method parameters). > > So I''ve made a change [1] in trunk, that will let you use > > def mymethod(param1, param2, param3) > end > > In your controllers. > > Its backwards compatible though, so all your existing code will still > work, if you haven''t declared it. It''ll be a lot cleaner and > consistent with the other dispatching modes if you switch to this > convention though (not sure why I didn''t make it The Way from the > start :P). > > I''m thinking of deprecating the old style (@params[''name'']) for removal by 1.0.I like it. It keeps the distinction between local values and values from the request. I thought PHP led to some serious vulnerabilities in scripts due to this ability so they implemented $_GET and $_POST vars. -- rick http://techno-weenie.net
On Fri, 25 Mar 2005 19:52:41 -0600, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I like it. It keeps the distinction between local values and values > from the request. I thought PHP led to some serious vulnerabilities > in scripts due to this ability so they implemented $_GET and $_POST > vars.To clarify, this only affects ActionWebService methods defined inside controllers, not standard controller actions. Leon