Controllers/files_controller.rb
class FilesController < ApplicationController
 def export_database(obj)
    obj.save_to_file
 end
end



Views/files/show.html.erb
<% [RmEnv, RmProc].each do |db_obj| %>
<%= button_to "export database #{db_obj}", :action => export_database, #
don't know how to pass parameter such that :obj => db_obj %>
<% end %>


Or any other suggestion on who to activate a method via user activity.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to