Thanks.  I was not sure if there was a totally transparent way to do.

On Thu, Feb 11, 2010 at 3:41 PM, Frederick Cheung <
frederick.che...@gmail.com> wrote:

>
>
> On Feb 11, 4:57 pm, Me <chabg...@gmail.com> wrote:
> > Is there a way to use any kind of helper or something if you do the
> > same thing on every rjs call?  Like render a flash box div?
>
> if in a helper you stick something like
>
> def rjs_flash
>  update_page do |page|
>    ...
>  end
> end
>
> Then in your templates you can do
>
> page << rjs_flash
>
> You can also do stuff like link_to_function('Foo', rjs_flash) if you
> use those helpers. (First saw this trick at rails conf europ a few
> years ago, slides to the talk are here:
> http://www.slideshare.net/RubyOnRails_dude/marcel-molina-jr-presentation
>
> Fred
>
> --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to