Created
December 15, 2014 03:40
-
-
Save willrust/dac218f04d69b2be6533 to your computer and use it in GitHub Desktop.
ActiveAdmin Doorkeeper Resource
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ActiveAdmin.register Doorkeeper::Application do | |
| permit_params :name, :redirect_uri | |
| # ActiveAdmin will name Rails Engine models with their namespaced names (ex:doorkeeper_application) which | |
| # will fail validation and spit back a form with errors where the fields would otherwise be valid. | |
| # Setting the model resource name back to 'application'. | |
| controller do | |
| resources_configuration[:self][:instance_name] = 'application' | |
| end | |
| index do | |
| selectable_column | |
| id_column | |
| column :name | |
| column :uid | |
| column :secret | |
| column :redirect_uri | |
| column :created_at | |
| actions | |
| end | |
| filter :name | |
| filter :uid | |
| filter :secret | |
| filter :redirect_uri | |
| filter :created_at | |
| form do |f| | |
| f.inputs "API Application Details" do | |
| f.input :name | |
| f.input :redirect_uri | |
| end | |
| f.actions | |
| end | |
| end |
Same here, if someone has a solution I think it may be linked in some way to the will_paginate gem.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gives "undefined method `per_page_kaminari' for #<Doorkeeper::Application::ActiveRecord_Relation"
How to resolve that ?