class TagRelevance

Attributes

id[R]
tag_id[R]

Public Class Methods

new(id = nil, tag_id = nil) click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 141
def initialize(id = nil, tag_id = nil); @id, @tag_id = id, tag_id end

Public Instance Methods

persisted?() click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 144
def persisted?; @id.present? end
save() click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 143
def save; @id = 1; @tag_id = 1 end
to_key() click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 142
def to_key; id ? [id] : nil end
to_param() click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 145
def to_param; @id && @id.to_s; end
value() click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 146
def value
  @id.nil? ? "new #{self.class.name.downcase}" : "#{self.class.name.downcase} ##{@id}"
end