No release in over a year
Setup an action to be called for the configured object.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 7.0
 Project Readme

RailsAdminTokens

This Rails Admin action allows you to configure an action to be called on the object. The motivation behind this was to manually update oauth2 tokens but can be used to call any action on the object.

Usage

After adding this gem to your bundle, you can setup your rails_admin initializer to include tokens, like so:

# config/initializers/rails_admin.rb
  config.actions do
      dashboard                     # mandatory
      index                         # mandatory
      # ...
    
      tokens do
        only ['MyTargetUser']
        refresh_method :my_custom_method
      end
  end

Customize your view:

# views/rails_admin/main/tokens.html.erb

Installation

Add this line to your application's Gemfile:

gem "rails_admin_tokens"

And then execute:

$ bundle

Or install it yourself as:

$ gem install rails_admin_tokens

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.