Class: Neo4j::MetaModel::Meta::HasAssociationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Neo4j::MetaModel::Meta::HasAssociationsController
- Defined in:
- app/controllers/neo4j/meta_model/meta/has_associations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/controllers/neo4j/meta_model/meta/has_associations_controller.rb', line 17 def create has_association = HasAssociation.create(has_association_params) create_models render json: has_association end |
#destroy ⇒ Object
25 26 27 28 29 30 31 |
# File 'app/controllers/neo4j/meta_model/meta/has_associations_controller.rb', line 25 def destroy @has_association.destroy create_models render json: nil end |
#index ⇒ Object
7 8 9 |
# File 'app/controllers/neo4j/meta_model/meta/has_associations_controller.rb', line 7 def index render json: HasAssociation.all end |
#show ⇒ Object
11 12 13 14 15 |
# File 'app/controllers/neo4j/meta_model/meta/has_associations_controller.rb', line 11 def show respond_to do |format| format.json { render json: @has_association } end end |