Class: Recipes::ActiveStorage

Inherits:
Rails::AppBuilder
  • Object
show all
Defined in:
lib/potassium/recipes/active_storage.rb

Instance Method Summary collapse

Instance Method Details

#askObject



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

#createObject



10
11
12
13
# File 'lib/potassium/recipes/active_storage.rb', line 10

def create
  return unless selected?(:active_storage)
  add_active_storage
end

#installObject



15
16
17
# File 'lib/potassium/recipes/active_storage.rb', line 15

def install
  add_active_storage
end

#installed?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/potassium/recipes/active_storage.rb', line 19

def installed?
  file_exist?('config/storage.yml')
end