Class: Ponytail::SchemasController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Ponytail::SchemasController
- Defined in:
- app/controllers/ponytail/schemas_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 8 |
# File 'app/controllers/ponytail/schemas_controller.rb', line 5 def show @schema = Schema.new respond_with @schema end |
#update ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/ponytail/schemas_controller.rb', line 10 def update # TODO, WIP: @schema = Schema.new if @schema.update(schema_params) flash[:notice] = "Schema was successfully updated." render json: @schema, status: :ok else flash[:notice] = "Schema update was failed." render json: @schema, status: :bad_request end end |