There’s a controller method in Rails that I want to do nothing for now, so I write
def hide
end
as a placeholder.
There’s a link on a page that invokes this controller. When I click on the link, it says
Missing template posts/hide with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]}
Is it possible to have a controller that really does nothing, and does not render any page (so the user can click on the link and nothing happens)?
Try this:
The server will still be hit, however, and the user will see a blank page. I don’t think this is what you want.
It sounds like you should use jquery to capture the click event and prevent the browser from following the link: