blob: cbfa1d3389acf5a98ac730d336f5ab76211e249d (
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
|