Resourceful more standardized controllers. Uses inherited resources. Geared towards api driven apps.
More soon.
Please use >= 1.0.0 if you are using ruby 3, or 0.1.4 if you are using <= ruby 3.0
class Admin::Api::WidgetsController < ::Admin::Api::BaseController
include ::Trax::Controller
defaults :resource_class => ::Widget
def resource_serializer
::Admin::Api::WidgetSerializer
end
#normally same as above unless overridden
def collection_serializer
::Admin::Api::WidgetSerializer
end
end
Add this line to your application's Gemfile:
gem 'trax_controller'
And then execute:
$ bundle
Or install it yourself as:
$ gem install trax_controller
TODO: Write usage instructions here
- Fork it ( https://github.com/[my-github-username]/trax_controller/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