ruby - Active Admin Custom Method Parameter -
in activeadmin i'm trying value form when press action_item on dashboard, i'm not sure how have far, , runs, able pass parameter different method calls.
activeadmin.register_page "dashboard" menu :priority => 1, :label => proc{ i18n.t("active_admin.dashboard") } page_action :scrape, :method => :post #the scraper works, don't know how pass info #from form below method # scrape = scraper.new # scrape.scrape redirect_to admin_dashboard_path, :notice => "ran scraper!" end action_item link_to "run scraper", admin_dashboard_scrape_path, :method => :post end content :title => proc{ i18n.t("active_admin.dashboard") } panel "run course scraper" para "run course webscraper pull current class list , insert course table in database" form |f| f.input "session" end end end end
i want input form form says session pass page_action :scrape somehow, ideas?
you try add controller actions dashboard page , add f.buttons form etc.
using javascript should work guess.
Comments
Post a Comment