Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Enjoy Files

Enjoy Files

  • Prerequies

    sudo gem install mime-types sudo gem install rubyzip

    Note: If you want to use thumbnails capabilities, you have to install RMagick (http://rmagick.rubyforge.org/)

  • Installation

    Update the DB by creating migration files > script/generate enjoy_files_setup > script/generate acts_as_file <model_name>

    Note: do not forget to run “rake db:migrate”

  • Usage:

    In your model:

    class MyModel < ActiveRecord::Base acts_as_file <options> ... end

    where options are:

    Example: acts_as_file :field => ‘File’, :path => ‘uploaded/images’, :types => ‘image’, :required => true, :after_save => :create_thumbnails, :after_delete => :delete_thumbnails

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly

Users


See all details


Membership

+ Join this railsplugin

Record Maintainer

'None'