module VulgataMethods
Public Instance Methods
vulgata_after_approved()
click to toggle source
# File lib/vulgata/concerns/vulgata_methods.rb, line 40 def vulgata_after_approved self.vlg_after_approved.blank? ? nil : self.send(self.vlg_after_approved) end
vulgata_context_path()
click to toggle source
name of path helper for the object's context - i.e :blog_post_path (for a Comment object)
# File lib/vulgata/concerns/vulgata_methods.rb, line 83 def vulgata_context_path vlg_context_path end
vulgata_context_path_param()
click to toggle source
name of param to send to path helper - property of associated object - i.e :post (for a Comment object)
# File lib/vulgata/concerns/vulgata_methods.rb, line 88 def vulgata_context_path_param vlg_context_path_param end
vulgata_item_type()
click to toggle source
# File lib/vulgata/concerns/vulgata_methods.rb, line 66 def vulgata_item_type self.class.base_class.name end
vulgata_name()
click to toggle source
# File lib/vulgata/concerns/vulgata_methods.rb, line 70 def vulgata_name self[:name] || self[:title]|| self[:subject] || self[:description] || self[:body] || self[:text] || self.to_s end
vulgata_preprocess_getter(data)
click to toggle source
# File lib/vulgata/concerns/vulgata_methods.rb, line 48 def vulgata_preprocess_getter data self.vlg_preprocess_getter.blank? ? data : self.send(self.vlg_preprocess_getter, data) end
vulgata_preprocess_setter(data)
click to toggle source
# File lib/vulgata/concerns/vulgata_methods.rb, line 44 def vulgata_preprocess_setter data self.vlg_preprocess_setter.blank? ? data.delete_if { |k, v| v.blank? } : self.send(self.vlg_preprocess_setter, data) end
vulgata_priority()
click to toggle source
# File lib/vulgata/concerns/vulgata_methods.rb, line 74 def vulgata_priority @vlg_priority || vlg_priority end
vulgata_priority=(value)
click to toggle source
# File lib/vulgata/concerns/vulgata_methods.rb, line 78 def vulgata_priority= value @vlg_priority = value end
vulgata_save_translation(translation_state)
click to toggle source
# File lib/vulgata/concerns/vulgata_methods.rb, line 62 def vulgata_save_translation translation_state self.vlg_strategy.save_translation translation_state end
vulgata_translated_attribute_names()
click to toggle source
returns array of the translated attributes names
# File lib/vulgata/concerns/vulgata_methods.rb, line 53 def vulgata_translated_attribute_names self.class.vulgata_translated_attribute_names end
vulgata_translation_data(translation_state)
click to toggle source
returns hash of the translated data
# File lib/vulgata/concerns/vulgata_methods.rb, line 58 def vulgata_translation_data translation_state self.vlg_strategy.translation_data translation_state end