On 2/6/07, Francis Sinson
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> Im using a lot of RJS in the application i am developing.
>
> I was hoping to get some inputs about some best practices when using
> RJS.
>
> when doing very simple things like, shaking an empty field when
> validating,
>
> i just do it in the controller.
> like this:
> render :update do |page|
> page.visual_effect :shake,
"link_asset_link_url"
> page.visual_effect :highlight,
"link_asset_link_url"
> end
>
> and when doing more stuff, i put it in an rjs file.
>
> Is the first one a no no? Since im not doing it the MVC way?
>
> May i know some of your opinions here?
I like to keep my RJS in actual RJS templates, just so I know where it
all is. Having some of it in a controller and some of it in an RJS
template seems disorganized to me. I suppose the same argument could
be raised for keeping it all in the controller rather than in RJS
templates, and I''d probably be ok with that too if I didn''t
already
have tons of it in templates. Ok.. maybe not "tons" but certainly
more than I want to move.
--
Greg Donald
http://destiney.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
-~----------~----~----~----~------~----~------~--~---