spanner / radiant-paperclipped_multisite-extension forked from kbingman/radiant-paperclipped_multisite-extension

Adds multisite support to paperclipped, showing assets only for the current site if the user is not an admin

This URL has Read+Write access

README.md

paperclipped_multi_site

This is just a demonstration, really. It's a one-liner that scopes assets to sites.

Our fork of multi-site is needed, and does all the work (by putting a scope around ActiveRecord::find_every).

Requirements

Installation

git submodule add git://github.com/spanner/radiant-paperclipped_multisite-extension.git vendor/extensions/paperclipped_multi_site

Please note that the repository name is wrong: it should really be paperclipped_multi_site (with the extra underscore). It doesn't relaly matter as long as you install it to the right place.

Or

You could get rid of this extension altogether by adding this to Asset:

is_site_scoped if respond_to? :is_site_scoped

But the conditionality does make your tests a bit tangled.

More

See our multi_site for an explanation of is_site_scoped.

Some very basic tests are included to make sure that Asset loads and is properly hooked up.

Questions

Always welcome. Will at spanner.org.