Module: OurKudos::Api::Controllers::ClientBase
- Includes:
- ApiHelper
- Defined in:
- lib/ourkudos/controllers/client_base.rb
Instance Method Summary
collapse
Methods included from ApiHelper
#api_columns, #current_model, #model_as_symbol, #model_instance
Instance Method Details
#create ⇒ Object
8
9
10
|
# File 'lib/ourkudos/controllers/client_base.rb', line 8
def create
current_user.ourkudos.post("/api/#{controller_name}.json", params[model_as_symbol])
end
|
#update ⇒ Object
12
13
14
|
# File 'lib/ourkudos/controllers/client_base.rb', line 12
def update
current_user.ourkudos.post("/api/#{controller_name}/#{mode_instance.id.to_s}.json", params[model_as_symbol])
end
|