Method: Rails::Generators::ActiveModel.build
- Defined in:
- railties/lib/rails/generators/active_model.rb
.build(klass, params = nil) ⇒ Object
GET new POST create
50 51 52 53 54 55 56 |
# File 'railties/lib/rails/generators/active_model.rb', line 50 def self.build(klass, params = nil) if params "#{klass}.new(#{params})" else "#{klass}.new" end end |