Forum: Ruby on Rails RJS and different views

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.
Adam A. (Guest)
on 2009-05-19 15:24
I have Results Controller. It has an index action with a corresponding
index view.
In the view their is a search form which is sent to a search action in
the same controller. I wanted to seperate this from the index action
because its pretty heavy and involves backgroundrb, scraping etc.

Once the results are scraped in the search action I want to go back to
the index view and add them there.

whats best practice. So far i can see 2 ways to do this.
i can either manipulate the index view within the search action somehow
or
i can somehow pass teh results to the index controller and let it do
ajax updates on its own view.

How do i go about this? If i page.redirect_to :url => "index" - it will
reload the index page all over again and I dont want that.

(im fairly new to ajax / rails so perhaps overlooking something )
This topic is locked and can not be replied to.