Class: Ripple::Generators::ActiveModel
- Inherits:
-
Rails::Generators::ActiveModel
- Object
- Rails::Generators::ActiveModel
- Ripple::Generators::ActiveModel
- Defined in:
- ripple/lib/rails/generators/ripple_generator.rb
Overview
Generator for a Document model
Class Method Summary (collapse)
Instance Method Summary (collapse)
Class Method Details
+ (Object) all(klass)
45 46 47 |
# File 'ripple/lib/rails/generators/ripple_generator.rb', line 45 def self.all(klass) "#{klass}.all" end |
+ (Object) build(klass, params = nil)
53 54 55 56 57 58 59 |
# File 'ripple/lib/rails/generators/ripple_generator.rb', line 53 def self.build(klass, params=nil) if params "#{klass}.new(#{params})" else "#{klass}.new" end end |
+ (Object) find(klass, params = nil)
49 50 51 |
# File 'ripple/lib/rails/generators/ripple_generator.rb', line 49 def self.find(klass, params=nil) "#{klass}.find(#{params})" end |
Instance Method Details
- (Object) destroy
73 74 75 |
# File 'ripple/lib/rails/generators/ripple_generator.rb', line 73 def destroy "#{name}.destroy" end |
- (Object) errors
69 70 71 |
# File 'ripple/lib/rails/generators/ripple_generator.rb', line 69 def errors "#{name}.errors" end |
- (Object) save
61 62 63 |
# File 'ripple/lib/rails/generators/ripple_generator.rb', line 61 def save "#{name}.save" end |
- (Object) update_attributes(params = nil)
65 66 67 |
# File 'ripple/lib/rails/generators/ripple_generator.rb', line 65 def update_attributes(params=nil) "#{name}.update_attributes(#{params})" end |