app/models/phcpress/blog/post.rb in phcpress-2.7.5 vs app/models/phcpress/blog/post.rb in phcpress-2.8.0

- old
+ new

@@ -1,16 +1,19 @@ module Phcpress class Blog::Post < ActiveRecord::Base - # Define scoped_to for Devise - def scoped_to(account) - where(:user_id => current_user.id) - end + # Filters Before Post + before_create :authour # For Image Uploads mount_uploader :pstimage, Phcpress::PstimageUploader # Associate Post Authour to User belongs_to :user + + # Define r Devise + def authour + self.user_id = current_user.id + end end end