Class: Recipes::ActiveStorage
- Inherits:
-
Rails::AppBuilder
- Object
- Rails::AppBuilder
- Recipes::ActiveStorage
- Defined in:
- lib/potassium/recipes/active_storage.rb
Instance Method Summary collapse
Instance Method Details
#ask ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/potassium/recipes/active_storage.rb', line 2 def ask active_storage = answer(:active_storage) do Ask.confirm("Do you want to use ActiveStorage for uploads?") end set(:active_storage, active_storage) end |
#create ⇒ Object
10 11 12 13 |
# File 'lib/potassium/recipes/active_storage.rb', line 10 def create return unless selected?(:active_storage) add_active_storage end |
#install ⇒ Object
15 16 17 |
# File 'lib/potassium/recipes/active_storage.rb', line 15 def install add_active_storage end |
#installed? ⇒ Boolean
19 20 21 |
# File 'lib/potassium/recipes/active_storage.rb', line 19 def installed? file_exist?('config/storage.yml') end |