I would say it depends on your goal. There are lots of approaches to take in
Rails. There are lots of helpers and even a great book on Rails and RJS from
O''Reilly that you could investigate.
But if you have a timetable, just do it the way you know how and then
refactor it later.
I still tend to use a bit of HTML form tags instead of the helper tags. :)
On 6/28/06, AFM <kris@alternativefocusmedia.com>
wrote:>
> Kris@AFM wrote:
> > I''ve used script.aculo.us before (pre-Rails) to do JS effects
like
> > having a menu link that when clicked shows a sub menu, that kind of
> > thing.
> >
> > Now I want to do something very similar but in Rails. Basically I have
a
> > list of summaries displayed in a view. I want to have a link that when
> > pressed shows the detail.
> >
> > To do this I would normally have each summary in a DIV, the ID of each
> > DIV would have a number suffix. The on_click event would pass the
suffix
> > to a JS function which would hide/show (using a script.aculo.us
effect)
> > the relevent DIV containing the detail.
> >
> > How should I go about this in Rails, in other words is there a helper,
> > better way of doing it, Javascript views maybe...
> >
> > Best wishes!
>
> Any thoughts?
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060628/9b065fe9/attachment-0001.html