Module: UnderConstruction::Generators

Defined in:
lib/generators/under_construction/constants.rb,
lib/generators/under_construction/clear_generator.rb,
lib/generators/under_construction/config_generator.rb

Defined Under Namespace

Classes: ClearGenerator, ConfigGenerator

Constant Summary collapse

APPLICATION_CONFIG_TXT =
"\n# Editing UnderConstruction block causes it's clear generator to not work\nbefore_filter :redirect_to_under_construction\n\n# Will redirect all requests to under construction page\ndef redirect_to_under_construction\n  if request.host_with_port == UnderConstruction.config.host_name\n    unless request.url =~ /(under_construction|email_storage)/\n      redirect_to under_construction_index_path\n    end\n  end\nend\n"
ROUTES_CONFIG_TXT =
"\n# generated by under_construction gem\nresources 'under_construction_email_storage', only: :create\nresources 'under_construction', only: :index\n"
ROUTES_REDIRECT_TO_TXT =
"\n# generated by under_construction gem\nmatch \"/*other\" => redirect(\"/under_construction\")\n"
ROUTES_CLEAR_TXT =
"\n# generated by under_construction gem\nmatch \"under_construction\", :to => redirect('/')\n"