Class: TentD::API::Groups::Update
- Inherits:
-
Middleware
- Object
- Middleware
- TentD::API::Groups::Update
- Defined in:
- lib/tentd/api/groups.rb
Instance Method Summary collapse
Methods inherited from Middleware
Methods included from Authorizable
#authorize_env!, #authorize_env?
Constructor Details
This class inherits a constructor from TentD::API::Middleware
Instance Method Details
#action(env) ⇒ Object
73 74 75 76 77 78 79 |
# File 'lib/tentd/api/groups.rb', line 73 def action(env) if group = Model::Group.first(:id => env.params[:group_id]) group.update(:name => env.params.data.name) env['response'] = group.reload end env end |