Module: EffectiveAssets
- Defined in:
- lib/effective_assets.rb,
lib/effective_assets/engine.rb,
lib/effective_assets/version.rb,
lib/generators/effective_assets/install_generator.rb
Defined Under Namespace
Modules: Generators
Classes: Engine
Constant Summary
collapse
- AWS_PUBLIC =
'public-read'
- AWS_PRIVATE =
'authenticated-read'
- IFRAME_UPLOADS =
'effective_iframe_uploads'
- VERSION =
'1.12.2'.freeze
Class Method Summary
collapse
Class Method Details
.authorized?(controller, action, resource) ⇒ Boolean
41
42
43
44
45
46
|
# File 'lib/effective_assets.rb', line 41
def self.authorized?(controller, action, resource)
if authorization_method.respond_to?(:call) || authorization_method.kind_of?(Symbol)
raise Effective::AccessDenied.new() unless (controller || self).instance_exec(controller, action, resource, &authorization_method)
end
true
end
|
.permitted_params ⇒ Object
37
38
39
|
# File 'lib/effective_assets.rb', line 37
def self.permitted_params
{:attachments_attributes => [:id, :asset_id, :attachable_type, :attachable_id, :position, :box, :_destroy]}
end
|
.setup {|_self| ... } ⇒ Object
31
32
33
34
35
|
# File 'lib/effective_assets.rb', line 31
def self.setup
yield self
configure_carrierwave
end
|