Sha256: 440ace6f637cff8d6920ce6203354026ff77d55dda7ba20f7432d83d8e8b846c

Contents?: true

Size: 539 Bytes

Versions: 7

Compression:

Stored size: 539 Bytes

Contents

class Ckeditor::AttachmentFile < Ckeditor::Asset
  has_attached_file :data,
                    :storage => :s3,
                    :s3_credentials => "#{Rails.root}/config/amazon_s3.yml",
                    :path => ":class/:id/:basename.:extension"
  
  validates_attachment_size :data, :less_than => 100.megabytes
  validates_attachment_presence :data
	
	def url_thumb
	  @url_thumb ||= begin
	    extname = File.extname(filename).gsub(/^\./, '')
      "/javascripts/ckeditor/filebrowser/images/thumbs/#{extname}.gif"
	  end
	end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flexible_admin-0.2.0.2 lib/generators/flexible_admin/templates/ckeditor/attachment_file.rb
flexible_admin-0.2.0.1 lib/generators/flexible_admin/templates/ckeditor/attachment_file.rb
flexible_admin-0.2.0 lib/generators/flexible_admin/templates/ckeditor/attachment_file.rb
flexible_admin-0.1.3 lib/generators/flexible_admin/templates/ckeditor/attachment_file.rb
flexible_admin-0.1.2 lib/generators/flexible_admin/templates/ckeditor/attachment_file.rb
flexible_admin-0.1.1 lib/generators/flexible_admin/templates/ckeditor/attachment_file.rb
flexible_admin-0.1.0 lib/generators/flexible_admin/templates/ckeditor/attachment_file.rb