Search code examples
ruby-on-railsruby-on-rails-4rails-routinglink-to

How do you implement a dummy link_to in Rails 4


OK, so I'm just migrating my first project from Rails 3 to Rails 4, the project is under development and so has certain links that are only there for the sake of content.

In Rails 3 I could do this:

link_to "To be added", {:controller => "#", :action => "#"}

This would give me a dummy link that I could style etc. This does not work in Rails 4 due to a routing error:

No route matches {:action=>"#", :controller=>"#"}

It could just be that I'm slightly sleep deprived at the moment but I can't seem to figure out a decent way of solving this and achieving the same functionality.


Solution

  • And why not something like: link_to "To be added", "#"?