Ruby button action

have a method in a controller file that I want activated only when a
button is pressed. That what i do


<%= button_to ‘Export POINT’, :controller => ‘my_controller’, :action =>
‘create_file_txt’ %>


def create_file_txt


permission :view_button_exp, {:controller => :my_controller, :action =>
:create_file_txt}, :require => :member

It’s not working, have i an erreur ??


you may get better results in a rails thread or forum :wink:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs