README.rdoc in rmce_uploadr-0.0.2 vs README.rdoc in rmce_uploadr-0.0.3
- old
+ new
@@ -17,20 +17,24 @@
* add <tt>gem "rmce_uploadr"</tt> to Gemfile if your using Bundler and run <tt>bundle install</tt>
=== 2. Set RMceUploadr::App as a middleware
* for a rails app add the following inside <tt>Rails::Initializer.run</tt> block:
- config.middleware.use "RMceUploadr::App" do |conf|
+ config.middleware.use "RMceUploadr::App" do |app|
# configuration according to ActiveRecord::Base.establish_connection
- conf.dbconf = {:adapter => 'sqlite3',
- :database => File.join(File.dirname(__FILE__), '..', '..', 'shared', 'db.sqlite3')}
+ app.dbconf = {:adapter => 'sqlite3',
+ :database => File.join(File.dirname(__FILE__), '..', '..', 'shared', 'db.sqlite3')}
+ app.settings.set :cdn_host, "http://localhost:3000"
end
* almost the same if you're a rack/sinatra app:
- use ::RMceUploadr::App do |conf|
+ use ::RMceUploadr::App do |app|
# configuration according to ActiveRecord::Base.establish_connection
- conf.dbconf = {:adapter => 'sqlite3',
- :database => root_path('..', 'shared', 'db.sqlite3')}
+ app.dbconf = {:adapter => 'sqlite3',
+ :database => root_path('..', 'shared', 'db.sqlite3')}
end
+<tt>cdn_host</tt> is an optional parameter. Useful when you host your images through another domain.
+Having this set will result in images src attribute be an absolute URL, otherwise image URLs will
+be something like "/public/uploads/g/images/..."
=== 3. Add plugin loading to TinyMCE init function, e.g.
<script type="text/javascript" charset="utf-8">
// Initialize TinyMCE with rmce_uploadr plugin and inlinepopups