Patrick Doyle wrote:> Is there a standard approach to the controller actions that exist
> solely to populate data do be shown in a view when using RESTful
> routing?
>
> I understand and almost appreciate the 7 actions that exist to
> implement the ideas of RESTful routes in RoR, but consider a select
> box whose contents change based on the contents of some other select
> box. The little I''ve learned of AJAX and RoR show me how to do
this
> using #remote_function, but that implies that there is an action to be
> invoked on the controller to implement that remote function.
>
> I have played games with calling the #new and #edit actions and
> checking for the magical parameter passed in the :with clause. Is
> that what folks do?
[...]
It''s not what I''d do in most cases. I''d be more
inclined to create a
new action than to abuse the :with parameter. Remember, the 7 common
actions are *common* but in no way *magical*. If your application is
best served by creating a controller action that isn''t one of the big
7,
by all means do it. REST is about general structure, not specific
action names.
>
> --wpd
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org
--
Posted via http://www.ruby-forum.com/.