Reputation: 5532
Is it possible in rails 3 to have a link pointing to a controller action, but not render anything? Let's say I just want to call a couple rake tasks. Is this possible?
Upvotes: 1
Views: 1198
Reputation: 15788
You can render nothing by using:
render :nothing => true
At the end of your action in the controller.
Upvotes: 8
Reputation: 540
Call the method and add at the end of it a redirect_to or render to a site you want to view. Don't forget to add this to your routes. You can also use flash messages to show to the user that something happend :)
Upvotes: 0