class CommentRelevance
Attributes
comment_id[R]
id[R]
Public Class Methods
new(id = nil, comment_id = nil)
click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 125 def initialize(id = nil, comment_id = nil); @id, @comment_id = id, comment_id end
Public Instance Methods
persisted?()
click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 128 def persisted?; @id.present? end
save()
click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 127 def save; @id = 1; @comment_id = 1 end
to_key()
click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 126 def to_key; id ? [id] : nil end
to_param()
click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 129 def to_param; @id && @id.to_s; end
value()
click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 130 def value @id.nil? ? "new #{self.class.name.downcase}" : "#{self.class.name.downcase} ##{@id}" end