Class: Merit::Generators::MeritGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/merit/generators/merit_generator.rb

Instance Method Summary collapse

Instance Method Details

#inject_merit_contentObject


8
9
10
11
12
# File 'lib/merit/generators/merit_generator.rb', line 8

def inject_merit_content
  if model_exists?
    inject_into_class(model_path, class_name, "  has_merit\n\n")
  end
end

#run_active_record_generatorsObject


14
15
16
# File 'lib/merit/generators/merit_generator.rb', line 14

def run_active_record_generators
  invoke 'merit:active_record:merit'
end