Ruby on Rails – link_to button / css

link_to generates a <a> tag, which is not input type="submit". What you should use should be a button_to, which generates a form with a input type="submit" button to the link:

<%= button_to "Add", new_admin_course_path, :id => "open-contacts-dialog-btn",
      :class => "inbox-sf-add-btn tip", :method => :get %>

Note the :method => :get. Without it, the button_to will generate a form with method set to post.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)