On 22.10.2005, at 7.00, Peter Van Dijck wrote:
> (beginners question)
>
> I couldn''t find this on the site/email archive. I want to do a
basic
> ajax subscribe-unsubscribe button. Any links/hints to get me started?
Take a look at the Ajax in Rails movie in Rails Academy [1]. It shows
pretty much what you''ll need. In short, you just use link_to_remote
[2] to call an action that does the subscription/unsubscription and
then use it''s "update" attribute to show the relevant button
after
the action has been executed.
[1] http://wiki.rubyonrails.com/rails/pages/RailsAcademy
[2] http://rails.rubyonrails.com/classes/ActionView/Helpers/
JavaScriptHelper.html#M000395
//jarkko
>
> Thanks,
> Peter
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
>
--
Jarkko Laine
http://jlaine.net
http://odesign.fi
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs