rails_admin

https://github.com/railsadminteam/rails_admin

Ruby

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data

RailsAdmin::Extensions::CanCan::AuthorizationAdapter#attributes_for

This is called in the new/create actions to determine the initial attributes for new
records. It should return a hash of attributes which match what the user
is authorized to create.

Source | Google | Stack overflow

Edit

git clone [email protected]:railsadminteam/rails_admin.git

cd rails_admin

open lib/rails_admin/extensions/cancan/authorization_adapter.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-RailsAdmin--Extensions--CanCan--AuthorizationAdapter-attributes_for-for-pr


# Commit to git

git add lib/rails_admin/extensions/cancan/authorization_adapter.rbgit commit -m "better docs for RailsAdmin::Extensions::CanCan::AuthorizationAdapter#attributes_for"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-RailsAdmin--Extensions--CanCan--AuthorizationAdapter-attributes_for-for-pr

hub pull-request


# Celebrate!