Class: Suspenders::Generators::Environments::DevelopmentGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/suspenders/environments/development_generator.rb

Instance Method Summary collapse

Instance Method Details

#annotate_render_view_with_filenameObject



25
26
27
28
29
30
31
32
# File 'lib/generators/suspenders/environments/development_generator.rb', line 25

def annotate_render_view_with_filename
  if development_config.match?(/^\s#\s*config\.action_view\.annotate_render_view_with_filename/)
    uncomment_lines "config/environments/development.rb",
      "config.action_view.annotate_rendered_view_with_filenames = true"
  else
    environment %(config.action_view.annotate_rendered_view_with_filenames = true), env: "development"
  end
end

#enable_i18n_customize_full_messageObject



34
35
36
# File 'lib/generators/suspenders/environments/development_generator.rb', line 34

def enable_i18n_customize_full_message
  environment %(config.active_model.i18n_customize_full_message = true), env: "development"
end

#enable_query_log_tags_enabledObject



38
39
40
# File 'lib/generators/suspenders/environments/development_generator.rb', line 38

def enable_query_log_tags_enabled
  environment %(config.active_record.query_log_tags_enabled = true), env: "development"
end

#raise_on_missing_translationsObject



17
18
19
20
21
22
23
# File 'lib/generators/suspenders/environments/development_generator.rb', line 17

def raise_on_missing_translations
  if development_config.match?(/^\s#\s*config\.i18n\.raise_on_missing_translations/)
    uncomment_lines "config/environments/development.rb", "config.i18n.raise_on_missing_translations = true"
  else
    environment %(config.i18n.raise_on_missing_translations = true), env: "development"
  end
end