Skip to content

Instantly share code, notes, and snippets.

@etagwerker
Created April 8, 2010 22:13
Show Gist options
  • Save etagwerker/360619 to your computer and use it in GitHub Desktop.
Save etagwerker/360619 to your computer and use it in GitHub Desktop.
class Admin::PicturesController < ApplicationController
layout 'admin'
admin_assistant_for Picture do |admin|
admin.index do |index|
index.columns :image
index[:image].image_size = "75x75"
end
end
end
class Picture < ActiveRecord::Base
has_attached_file :image, :styles => { :thumb => "75x75>" }
belongs_to :gallery
end
class Gallery < ActiveRecord::Base
has_many :pictures
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment