Skip to content
matenia edited this page Mar 13, 2011 · 2 revisions

Link Browser is available in the Rails 3 Branch

class PagesController < ApplicationController
  include TinymceFilemanager
  # accept only jpeg, gif or png for images
  image_accept_mime_types ['image/jpeg', 'image/gif', 'image/png']
  # limit image file size to 2MB
  image_file_size_limit 2.megabytes
  # accept only mpeg and flash files(swf) for media
  media_accept_mime_types ['video/mpeg', 'application/x-shockwave-flash']
  # limit media file size to 15MB
  media_file_size_limit 15.megabytes
  #thumbs created into '_small_' subdir
  thumbs_subdir 'small'
  #images save to RAILS_ROOT/public/manager/images thumbs in RAILS_ROOT/public/manager/images/_small_
  image_save_into_public_subdir 'manager/images'
  #images save to RAILS_ROOT/public/manager/images thumbs in RAILS_ROOT/public/manager/images/_small_
  media_save_into_public_subdir 'manager/media'
  #classes of objects, that can be browsed through LinkBrowser
  link_classes_accepted [Page,Category,Product]
  ...
end

You can supply as many Models as you want separated by a comma.

Clone this wiki locally