On Feb 11, 4:57 pm, Me <[email protected]> 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 [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.