How to add confirm message with link_to Ruby on rails

I might be mistaken but you don’t specify a controller along with the :action option. Have you tried the following? Assuming you have a messages resource configured in your route: link_to ‘Reset’, message_path(@message), :confirm => ‘Are you sure?’ EDIT: Above is deprecated. Rails 4.0 now accepts the prompt as a data attribute. See the doc … Read more

“render :nothing => true” returns empty plaintext file?

Since Rails 4, head is now preferred over render :nothing.1 head :ok, content_type: “text/html” # or (equivalent) head 200, content_type: “text/html” is preferred over render nothing: true, status: :ok, content_type: “text/html” # or (equivalent) render nothing: true, status: 200, content_type: “text/html” They are technically the same. If you look at the response for either using … Read more

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