mardi 4 décembre 2018

Adding custom form actions in ActiveAdmin

I'm using ActiveAdmin to add google OAuth credentials to a record. The client ID and Client Secret are added via record/1/edit, and I use those to generate a link to allow access. This link appears in record/view. I am trynig to find a way for the Administrator to enter the code returned by google oauth into the portal so that I can use it to generate credentials.

My current attempt looks something like this

row "Code from Google OAuth" do form do |f| label "Google Auth Code:" input :code, :label => "Code", :hint => "Code returned by google auth" f.action :submit end

I get an "undefined method: action" error form this code. Any ideas on how to return user input as a parameter?

Aucun commentaire:

Enregistrer un commentaire