It's an Rails backend for Mosaico
RailsMosaico 1.0 works the gem Paperclip.
You can add it to your Gemfile with:
gem 'mosaico-rails'
Run the following command for an easy one-step installation:
rails generate mosaico_rails:install OWNER_CLASS
This command generates MosaicoRails::Gallery
and MosaicoRails::Image
migrations. You can bind your Gallery to an existing model as User or whatever as:
rails generate mosaico_rails:install User
It generates some routes, mount as '/'
... bla bla les routes
Then,
rake db:migrate
cd vendor/assets/mosaico/mosaico
git pull origin master
npm install
npm install -g grunt-cli
grunt dist
As Paperclip, you can store your file into your file system or to S3. Actually mosaico-rails
doesn't provide Fog
storage adapter.
You should check your version of uglifier, if needed, as you can experience problems while uglifying mosaico's source code that is already uglified. We recommand using uglifier >= (3.0.2)
The gem is available as open source under the terms of the MIT License.