LoadResources
Installation
Add this line to your application's Gemfile:
gem 'load_resources'
And then execute:
$ bundle
Or install it yourself as:
$ gem install load_resources
Usage
Include load resources in controller include LoadResources
for all crud actions
automatic_resource :user
for specify actions automatic_resource :resource_name, only: [:new, :create] automatic_resource :resource_name, except: [:new, :create]
TODO for non crud actions.
automatic_resource :resource_name, only: [:nova_action], options: [:new, :all, :find ou find: find_id, conditions: 'seila' ] automatic_resource [:resource_name, :resource_name2], only: [:nova_action], options: [:new, :all, :find ou find: find_id, conditions: 'seila' ]
Contributing
- Fork it ( https://github.com/[my-github-username]/load_resources/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request