Class: RiddlerAdmin::Step
Constant Summary
collapse
- MODEL_KEY =
"st".freeze
- ID_LENGTH =
5
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.default_class ⇒ Object
6
7
8
|
# File 'app/models/riddler_admin/step.rb', line 6
def self.default_class
Steps::Content
end
|
Instance Method Details
#definition_hash(options = nil) ⇒ Object
19
20
21
22
|
# File 'app/models/riddler_admin/step.rb', line 19
def definition_hash options=nil
options ||= {}
serializable_hash options.merge(serializable_hash_options)
end
|
#excluded_attrs ⇒ Object
31
32
33
|
# File 'app/models/riddler_admin/step.rb', line 31
def excluded_attrs
[:created_at, :updated_at, :name]
end
|
#object ⇒ Object
15
16
17
|
# File 'app/models/riddler_admin/step.rb', line 15
def object
type.demodulize.underscore
end
|
#serializable_hash_options ⇒ Object
24
25
26
27
28
29
|
# File 'app/models/riddler_admin/step.rb', line 24
def serializable_hash_options
{
methods: :object,
except: excluded_attrs
}
end
|
#to_partial_path(detail = nil) ⇒ Object
10
11
12
|
# File 'app/models/riddler_admin/step.rb', line 10
def to_partial_path detail=nil
[self.class.name.underscore, detail].compact.join "/"
end
|