Class: Bricks::Frontend
- Inherits:
-
Base
- Object
- Base
- Bricks::Frontend
show all
- Defined in:
- lib/active_admin/generator/bricks/frontend.rb
Instance Attribute Summary
Attributes inherited from Base
#base_path, #context
Instance Method Summary
collapse
Methods inherited from Base
#apply?, #ask, #choose, #commit_all, #format, #initialize, #say, #template, #title, #yes?
Constructor Details
This class inherits a constructor from Bricks::Base
Instance Method Details
#apply_i18n_routes! ⇒ Object
25
26
27
28
29
|
# File 'lib/active_admin/generator/bricks/frontend.rb', line 25
def apply_i18n_routes!
gem 'i18n_routing'
copy_file "config/locales/it.yml"
commit_all "Added i18n routes"
end
|
#apply_letter_opener! ⇒ Object
31
32
33
|
# File 'lib/active_admin/generator/bricks/frontend.rb', line 31
def apply_letter_opener!
inject_into_file "config/environments/development.rb", " config.action_mailer.delivery_method = :letter_opener\n", after: "config.assets.debug = true\n"
end
|
#before_bundle ⇒ Object
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/active_admin/generator/bricks/frontend.rb', line 3
def before_bundle
gem "rails-i18n"
gem "slim-rails"
gem "showcase"
gem "compass-rails", group: :assets
gem "sextant", group: :development
gem "letter_opener", group: :development
gem "modernizr-rails", group: :assets
gem "sprockets-image_compressor", group: :production
commit_all "Added frontend gems"
remove_dir 'app'
directory 'app'
route "root to: 'static#homepage'"
commit_all "Added basic frontend skeleton"
apply_i18n_routes!
apply_letter_opener!
end
|