Class: TentD::API::Groups::Create
- Inherits:
-
Middleware
- Object
- Middleware
- TentD::API::Groups::Create
- 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
83 84 85 86 87 88 89 90 91 |
# File 'lib/tentd/api/groups.rb', line 83 def action(env) group_attributes = env.params[:data] if group = Model::Group.create(group_attributes) env.response = group env.notify_action = 'create' env.notify_instance = group end env end |