Class: Motor::ResourcesController
- Inherits:
-
ApiBaseController
- Object
- ActionController::API
- ApiBaseController
- Motor::ResourcesController
- Defined in:
- app/controllers/motor/resources_controller.rb
Instance Method Summary collapse
Methods included from CurrentAbility
Methods included from CurrentUserMethod
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 |
# File 'app/controllers/motor/resources_controller.rb', line 13 def create Motor::Resources::PersistConfigs.call(@resource) Motor::Configs::WriteToFile.call render json: { data: Motor::ApiQuery::BuildJson.call(@resource, params, current_ability) } end |
#index ⇒ Object
9 10 11 |
# File 'app/controllers/motor/resources_controller.rb', line 9 def index render json: { data: Motor::ApiQuery::BuildJson.call(@resources, params, current_ability) } end |