blob: b900ad0e80d25cf5454ac8a1c6ee77697ae02eb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class Info < ActiveRecord::Base
self.table_name = "info"
validates_presence_of :title, :content
def to_s
title
end
def to_param
[id, to_s.parameterize].join("-")
end
end
|