I had to do this with my first few rails apps after it turned out that render_component had horrible performance. It was kind of a pain because the first rails books used them in examples and there was no discussion back then about whether or not it was a good idea. Anyway...
>From my experience a render component in a view should be replaced by a render :partial and a render component in a controller could be replaced by a filter of some sort. That said, it has been a long long time and I might be a bit off there. At anyrate, I had only really used them in views and converting them usually involved just making sure whatever variables they depended on were passed in as locals or already available as instance variables. Some specific code examples could allow use to make suggestions about how to start re-factoring. On Jul 31, 6:22 am, Michael Cugley <[email protected]> wrote: > New to Ruby, new to Rails. I've googled much on this topic, but I don't > think I have enough knowledge to form the correct queries. > > I've been given the task of resurrecting an old Rails app that's not > seen the light of day for two years. It seems to rely heavily on > render_component which I am given to understand by various error > messages is now deprecated, unfashionable, and unfit to be seen with on > social occasions. > > However, what I haven't found is much on what to do with > render_component code to make it more modern, apart from "Components are > a special-purpose approach that can often be replaced with better use of > partials and filters." Whatever they may be. > > Is there anywhere I can go to help me understand what the > render_component calls are doing in this particular instance, and how > best to refactor them? > > -- > Mike Cugley > [email protected] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

