Forum: Ruby-Forum.com Ruby button action

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F5a3d0dd2c1cdcae99dd68ce7863be1b?d=identicon&s=25 Hamza Jemai (jha)
on 2014-02-26 09:05
I have a method in a controller file that I want activated only when a
button is pressed. That what i do

#index.html.erb#

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


#my_controller.erb#

def create_file_txt
.
.
end


#init.rb#

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

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

Thanks
This topic is locked and can not be replied to.