Nice to see a response. The other method is in another controller. And the other method needs to use send_data. (basically write a response) So I cannot use a simple class, include that class in the first controller. since the other method has to write out a response, it needs to be in another controller.(I hope I am right about this)
In the first controller, the request parameters are processed and these processed parameters need to be passed to the other method in the other controller. Mark Reginald James wrote: > Srividya Sharma wrote: >> I could only see two options to achieve this: >> 1. Use redirect_to and pass each parameter as a string. >> 2. Use render_component and pass the parameters as a hash. >> >> I have seen that render_component is not recommended in most cases. Is >> it recommended solution for this case? I think render_component slows >> down the request also. >> Which option is right for me? >> Are there any other ways to achieve this? Please guide me. > > If you don't want the browser url to change, you can just call > the other action like a method, passing the parameters in either > an instance variable or a method parameter (that's default nil > to allow it to be called externally). Or are you messing with > params directly? > > This is assuming the other method is in the same controller. > If it isn't, you'll have to make the other method available > within the first controller, either through inheritance or > mix-ins. > > -- > Rails Wheels - Find Plugins, List & Sell Plugins - > http://railswheels.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---