I am trying to set the canonical URL in the view of a project and it always comes back undefined. I can successfully set it in the controller, but I want to be able to override it in the view occasionally.
This is what I am putting in the view..
<% canonical "http://google.com" %>
And I get this error..
undefined method `canonical' for #<#Class:0x007ff6b7b2b550:0x007ff6b52716f0>
I'm using..
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
Rails 4.2.3
Mac OS X 10.10.4
I am trying to set the canonical URL in the view of a project and it always comes back undefined. I can successfully set it in the controller, but I want to be able to override it in the view occasionally.
This is what I am putting in the view..
<% canonical "http://google.com" %>
And I get this error..
undefined method `canonical' for #<#Class:0x007ff6b7b2b550:0x007ff6b52716f0>
I'm using.. ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14] Rails 4.2.3 Mac OS X 10.10.4
I am able to set the other tags in the view.
Any advice?