Class: NullGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- NullGenerator
- Includes:
- EasyGenGenerator
- Defined in:
- lib/easy_gen/null/null_generator.rb
Constant Summary collapse
- LOCATION =
bundle exec rails g null MyModel bundle exec rails d null MyModel
"domain"- TYPE =
"null"- AR_DEFAULTS =
{integer: 0, string: '"No Value"', text: '"No Value"', float: 0.0, decimal: 0.0, binary: false, boolean: false, date: 'Date.parse("1 Jan 1970")', datetime: 'Date.parse("1 Jan 1970")', timestamp: 'Date.parse("1 Jan 1970")', time: 'Time.parse("00:00:00")' }
Instance Method Summary collapse
Methods included from EasyGenGenerator
Instance Method Details
#main ⇒ Object
32 33 34 35 |
# File 'lib/easy_gen/null/null_generator.rb', line 32 def main raise "No such model - please check naming" unless model_exists? copy_templates end |