bjkpriyanka
bjkpriyanka

Reputation: 151

active admin: open a custom page after clicking on an action_item link

I have resource called "section".In edit page of section i have a action item called "upload scores".On click on "upload scores" i want to open a new page which should get the section id as parameter.

action_item only: :edit do
  link_to 'Upload Scores' {:id => section }
end

This page should contain a form with a "upload xls sheet" button and submit button.On click on "upload xls sheet" button I should be able to upload the sheet.on "submit" i should read it and update the database.

Thanks in Advance

Upvotes: 0

Views: 1286

Answers (1)

Mihir Kumar Thakur
Mihir Kumar Thakur

Reputation: 393

action_item only: :edit do
  link_to 'Upload Scores', upload_score_path(id: section)
end

change upload_score_path with your routes

Upvotes: 1

Related Questions