Class: RiddlerAdmin::Elements::Image

Inherits:
RiddlerAdmin::Element show all
Defined in:
app/models/riddler_admin/elements/image.rb

Constant Summary

Constants inherited from RiddlerAdmin::Element

RiddlerAdmin::Element::ID_LENGTH, RiddlerAdmin::Element::MODEL_KEY

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RiddlerAdmin::Element

available_classes, #content_id, #content_type, default_class, #excluded_attrs, #object, #serializable_hash_options, #short_name, short_name, #step, #to_partial_path

Class Method Details

.model_nameObject



6
7
8
# File 'app/models/riddler_admin/elements/image.rb', line 6

def self.model_name
  Element.model_name
end

Instance Method Details

#definition_hash(options = nil) ⇒ Object



10
11
12
13
14
15
# File 'app/models/riddler_admin/elements/image.rb', line 10

def definition_hash options=nil
  hash = super
  hash["src"] = url
  hash["alt"] = text
  hash
end