module Redactor2Rails::Orm::Base::AssetBase::InstanceMethods
Public Instance Methods
as_json(_options = nil)
click to toggle source
Calls superclass method
# File lib/redactor2_rails/orm/base.rb, line 26 def as_json(_options = nil) options = { methods: as_json_methods, root: false } super options end
as_json_methods()
click to toggle source
# File lib/redactor2_rails/orm/base.rb, line 22 def as_json_methods %i[image thumb] end
has_dimensions?()
click to toggle source
# File lib/redactor2_rails/orm/base.rb, line 6 def has_dimensions? respond_to?(:width) && respond_to?(:height) end
image()
click to toggle source
# File lib/redactor2_rails/orm/base.rb, line 14 def image url end
image?()
click to toggle source
# File lib/redactor2_rails/orm/base.rb, line 10 def image? Redactor2Rails::IMAGE_TYPES.include?(data_content_type) end
thumb()
click to toggle source
# File lib/redactor2_rails/orm/base.rb, line 18 def thumb url(:thumb) end