David Hill
Joined
Activity
It looks like the problem is that the parameters being passed into link_to_if
aren't quite right.
The documentation for the function at api.rubyonrails.org shows this as the signature for the method:
link_to_if(condition, name, options = {}, html_options = {}, &block)
The first parameter you pass will be evaluated down to true/false, which determine whether or not a link is rendered (true), or just text (false). After that you can pass in the text to display (klass.name) and the URL options (controller, action, etc).
Hope that helps!
SEEKING WORK: Senior Ruby Developer
Location: Kansas City, Missouri
Unable to relocate (the wife likes it here), so looking for local or remote contract/project work. The easiest way to contact me is email: david.esmale@gmail.com