Module: Footnotes::Notes::ComponentsNote::ClassMethods

Defined in:
lib/rails-footnotes/notes/components_note.rb

Instance Method Summary collapse

Instance Method Details

#titleObject



18
19
20
# File 'lib/rails-footnotes/notes/components_note.rb', line 18

def title
  @note_title ||= self.name.match(/^Footnotes::Notes::(\w+)ComponentNote$/)[1]
end

#to_symObject



14
15
16
# File 'lib/rails-footnotes/notes/components_note.rb', line 14

def to_sym
  @note_sym ||= "#{self.title.underscore}_component_#{(rand*1000).to_i}".to_sym
end