Class: Neo4j::Generators::ActiveModel
- Inherits:
-
Rails::Generators::ActiveModel
- Object
- Rails::Generators::ActiveModel
- Neo4j::Generators::ActiveModel
- Defined in:
- lib/rails/generators/neo4j_generator.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.all(klass) ⇒ Object
69 70 71 |
# File 'lib/rails/generators/neo4j_generator.rb', line 69 def self.all(klass) "#{klass}.all" end |
.build(klass, params = nil) ⇒ Object
77 78 79 80 81 82 83 |
# File 'lib/rails/generators/neo4j_generator.rb', line 77 def self.build(klass, params = nil) if params "#{klass}.new(#{params})" else "#{klass}.new" end end |
.find(klass, params = nil) ⇒ Object
73 74 75 |
# File 'lib/rails/generators/neo4j_generator.rb', line 73 def self.find(klass, params = nil) "#{klass}.find(#{params})" end |
Instance Method Details
#destroy ⇒ Object
97 98 99 |
# File 'lib/rails/generators/neo4j_generator.rb', line 97 def destroy "#{name}.destroy" end |
#errors ⇒ Object
93 94 95 |
# File 'lib/rails/generators/neo4j_generator.rb', line 93 def errors "#{name}.errors" end |
#save ⇒ Object
85 86 87 |
# File 'lib/rails/generators/neo4j_generator.rb', line 85 def save "#{name}.save" end |
#update_attributes(params = nil) ⇒ Object
89 90 91 |
# File 'lib/rails/generators/neo4j_generator.rb', line 89 def update_attributes(params = nil) "#{name}.update_attributes(#{params})" end |