Short description and motivation.
Run bundle exec rails app:folio:prepare_dummy_app
.
Add this line to your application's Gemfile:
gem 'folio', github: 'sinfin/folio'
And then execute:
$ bundle
Run:
$ rails generate folio:install
which will copy bunch of things into your, hopefilly clean, app
Then run migrations
$ rails db:migrate
Take a look to, not only Folio, handy generators by
$ rails g
If you want to analyse and store all Exif & IPTC data from uploaded Image files you have to install ExifTool (https://www.sno.phy.queensu.ca/~phil/exiftool/index.html).
Ubuntu: sudo apt install exiftool
MacOS: brew install exiftool
Every uploaded file will be processed and all the metadata will be saved
to the Folio::Image.file_metadata
field.
For a manual analysis of a file call Dragonfly.app.fetch(Folio::Image.last.file_uid).metadata
or rake folio:file:metadata
for batch processing of already downloaded but not
processed files.
Easily scaffold console controller and views for existing models.
$ rails generate folio:console:scaffold ModelName
Then add correct routes to config/routes
scope module: :folio do
namespace :console do
...
resources :model_names
...
end
end
and update Folio console config (config/initializers/folio.rb
) to see this ModelName
in console menu
Rails.application.config.folio_console_sidebar_link_class_names = [
%w[
...
ModelName
],
%w[...]
....
-
Check Wiki
-
If class responds to
:console_sidebar_count
, such number is displayed in Folio console sidebar -
If aasm event have option
confirm
, confirmation alert is displayed in change (in Foio console). You can passtrue
(defaults tot("folio.console.confirmation")
) or stringevent :pay, confirm: "Do You really want to pay this" do ... end
Clone & setup
git clone git@github.com:sinfin/folio.git
cd folio
bundle install
bin/rails db:setup
Run
bin/rails s
The gem is available as open source under the terms of the MIT License.