Sha256: f99231b3be0289e38df802ec00054789292550c332a7d1a6e7beca08534d3c82

Contents?: true

Size: 354 Bytes

Versions: 8

Compression:

Stored size: 354 Bytes

Contents

module Phcpress
	class News::Post < ActiveRecord::Base

		# Filters Before Post
		before_create :authour

		# For Image Uploads
		mount_uploader :pstimage, Phcpress::PstimageUploader
		
		# Associate Post Authour to User
		belongs_to :user, class_name: 'Devise:User'
		
		# Define r Devise
		def authour
			self.user_id = current_user.id
		end

	end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
phcpress-2.9.0 app/models/phcpress/news/post.rb
phcpress-2.8.13 app/models/phcpress/news/post.rb
phcpress-2.8.12 app/models/phcpress/news/post.rb
phcpress-2.8.11 app/models/phcpress/news/post.rb
phcpress-2.8.10 app/models/phcpress/news/post.rb
phcpress-2.8.9 app/models/phcpress/news/post.rb
phcpress-2.8.8 app/models/phcpress/news/post.rb
phcpress-2.8.7 app/models/phcpress/news/post.rb