Class: ActiveGraph::Generators::ActiveModel
- Inherits:
-
Rails::Generators::ActiveModel
- Object
- Rails::Generators::ActiveModel
- ActiveGraph::Generators::ActiveModel
- Defined in:
- lib/rails/generators/active_graph_generator.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.all(klass) ⇒ Object
71 72 73 |
# File 'lib/rails/generators/active_graph_generator.rb', line 71 def self.all(klass) "#{klass}.all" end |
.build(klass, params = nil) ⇒ Object
79 80 81 82 83 84 85 |
# File 'lib/rails/generators/active_graph_generator.rb', line 79 def self.build(klass, params = nil) if params "#{klass}.new(#{params})" else "#{klass}.new" end end |
.find(klass, params = nil) ⇒ Object
75 76 77 |
# File 'lib/rails/generators/active_graph_generator.rb', line 75 def self.find(klass, params = nil) "#{klass}.find(#{params})" end |
Instance Method Details
#destroy ⇒ Object
99 100 101 |
# File 'lib/rails/generators/active_graph_generator.rb', line 99 def destroy "#{name}.destroy" end |
#errors ⇒ Object
95 96 97 |
# File 'lib/rails/generators/active_graph_generator.rb', line 95 def errors "#{name}.errors" end |
#save ⇒ Object
87 88 89 |
# File 'lib/rails/generators/active_graph_generator.rb', line 87 def save "#{name}.save" end |
#update_attributes(params = nil) ⇒ Object
91 92 93 |
# File 'lib/rails/generators/active_graph_generator.rb', line 91 def update_attributes(params = nil) "#{name}.update_attributes(#{params})" end |