Skip to content
Snippets Groups Projects
Commit 2488a50b authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

add missing files

parent 195f853f
No related branches found
No related tags found
No related merge requests found
module Thumbnailable
extend ActiveSupport::Concern
included do
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
end
<% follow_text = current_user.following?(followable) ? 'Deixar de seguir' : 'Seguir' %>
<%= link_to follow_text, follow_user_path(id: current_user.id, followable_type: followable.class.name, followable_id: followable.id), method: :post, remote: true, class: 'btn btn-default follow-button' %>
class AddCounterToUserCollection < ActiveRecord::Migration
def change
add_column :collections, :follows_count, :integer, default: 0
add_column :users, :follows_count, :integer, default: 0
end
end
class ChangeLearningObjectScore < ActiveRecord::Migration
def change
change_column :learning_objects, :score, :float, default: 0.0
end
end
class AddThumbnailForCollections < ActiveRecord::Migration
def change
add_attachment :collections, :thumbnail
end
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