Module: Recordable::ClassMethods

Defined in:
lib/acts_as_railable/recordable.rb

Overview

class methods

Instance Method Summary collapse

Instance Method Details

#collection_placeholder_id(record_parent = nil) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/acts_as_railable/recordable.rb', line 25

def collection_placeholder_id record_parent=nil
  if record_parent.nil?
    "#{self.record_name}_collection_placeholder_id"
  else
    "#{record_parent.record_name}_#{record_parent.id}_#{self.record_name}_collection_placeholder_id"
  end
end

#form_error_placeholder_idObject



13
14
15
# File 'lib/acts_as_railable/recordable.rb', line 13

def form_error_placeholder_id
  "#{self.record_name}_error_placeholder_id"
end


41
42
43
# File 'lib/acts_as_railable/recordable.rb', line 41

def modal_id
  "#{self.record_name}_modal_id"
end


45
46
47
# File 'lib/acts_as_railable/recordable.rb', line 45

def modal_placeholder_id
  "#{self.record_name}_modal_placeholder_id"
end


21
22
23
# File 'lib/acts_as_railable/recordable.rb', line 21

def navbar_placeholder_id
  "#{self.record_name}_navbar_placeholder_id"
end

#pagination_placeholder_idObject



33
34
35
# File 'lib/acts_as_railable/recordable.rb', line 33

def pagination_placeholder_id
  "#{self.record_name}_pagination_placeholder_id"
end

#per_pageObject

override methods



50
51
52
# File 'lib/acts_as_railable/recordable.rb', line 50

def per_page
  nil
end

#record_nameObject



9
10
11
# File 'lib/acts_as_railable/recordable.rb', line 9

def record_name
  self.model_name.singular
end

#script_placeholder_idObject



37
38
39
# File 'lib/acts_as_railable/recordable.rb', line 37

def script_placeholder_id
  "#{self.record_name}_script_placeholder_id"
end

#titlebar_placeholder_idObject



17
18
19
# File 'lib/acts_as_railable/recordable.rb', line 17

def titlebar_placeholder_id
  "#{self.record_name}_titlebar_placeholder_id"
end