Skip to content
Snippets Groups Projects
Commit 13a1c922 authored by Matheus Agio Nerone's avatar Matheus Agio Nerone
Browse files

changing models


Signed-off-by: default avatarman13 <man13@inf.ufpr.br>
parent dd1edccf
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,6 @@ class LearningObject < ActiveRecord::Base
include Sociable
include Stateful
has_attached_file :thumbnail, styles: {medium: "530x300", small: "250x140"}
validates_attachment_content_type :thumbnail, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"]
has_and_belongs_to_many :topics
has_many :collection_items, as: :collectionable
......
class LearningObject::Attachment < ActiveRecord::Base
belongs_to :learning_object
has_attached_file :thumbnail, styles: {medium: "530x300", small: "250x140"}
validates_attachment_content_type :thumbnail, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"]
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment