Forum: Ruby on Rails Alternatives to components?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chris T (Guest)
on 2006-05-03 20:59
(Received via mailing list)
I'm about to start work on sidebars for my app, but I've heard a number
of people express doubts about them as the way to go (they are slow &
apparently DHH regretted coming up with them components). What other
solutions are people using for this type of need (i.e.needing to call an
action/view combo from within a view)?
Charlie B. (Guest)
on 2006-05-03 20:59
(Received via mailing list)
I use the very ugly method of putting alot code into the application
helper and calling it on each page.
Chris T (Guest)
on 2006-05-03 21:04
(Received via mailing list)
Yeah, I can see that would work -- but also that it's none too elegant.
In the api docs it says:

DonĂ¢??t use components as a way of separating concerns inside a single
application. Instead, reserve components to those rare cases where you
truly have reusable view and controller elements that can be employed
across many applications at once...
Components
<http://api.rubyonrails.org/classes/ActionControlle...
are a special-purpose approach that can often be replaced with better
use of partials and filters.

Does anyone have any examples of using partials and filters to replace
components (or any other comments)?
Joe (Guest)
on 2006-05-09 22:43
(Received via mailing list)
Perhaps "widgets" are the answer? link: http://blogrium.com/?p=60

Joe
Chris T (Guest)
on 2006-05-10 02:08
(Received via mailing list)
Thanks. Will check them out. Am currently trying to sort something out
with a before_filter, and it's sort of working, but not wild about how
I'm doing it.
This topic is locked and can not be replied to.