devape_cms 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/post.rb +5 -5
- metadata +1 -1
data/app/models/post.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
class Post < ActiveRecord::Base
|
2
2
|
set_table_name "devape_cms_posts"
|
3
3
|
acts_as_tree
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
has_and_belongs_to_many :categories
|
5
|
+
belongs_to :admin
|
6
|
+
has_many :contents
|
7
|
+
validates_presence_of :title
|
8
|
+
has_friendly_id :title, :use_slug => true
|
9
9
|
end
|