Class: ActiveForce::ModelGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- ActiveForce::ModelGenerator
show all
- Defined in:
- lib/generators/active_force/model/model_generator.rb
Defined Under Namespace
Classes: Attribute, String
Instance Method Summary
collapse
Instance Method Details
#create_model_file ⇒ Object
7
8
9
10
11
|
# File 'lib/generators/active_force/model/model_generator.rb', line 7
def create_model_file
@table_name = file_name.capitalize
@class_name = @table_name.gsub '__c', ''
template "model.rb.erb", "app/models/#{@class_name.downcase}.rb" if table_exists?
end
|