to_param shoul return a string
This commit is contained in:
parent
4cd6f77526
commit
0c1cd15470
@ -83,7 +83,7 @@ def initialize(id = nil, post_id = nil); @id, @post_id = id, post_id end
|
||||
def to_key; id ? [id] : nil end
|
||||
def save; @id = 1; @post_id = 1 end
|
||||
def persisted?; @id.present? end
|
||||
def to_param; @id; end
|
||||
def to_param; @id.to_s; end
|
||||
def name
|
||||
@id.nil? ? "new #{self.class.name.downcase}" : "#{self.class.name.downcase} ##{@id}"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user