generators/papermill_initializer/papermill_initializer.rb in papermill-1.4.3 vs generators/papermill_initializer/papermill_initializer.rb in papermill-2.0.0.pre
- old
+ new
@@ -15,13 +15,14 @@
# You can override these parameters here, or in your papermill associations definition.
# Associated PapermillAsset subclass (must be an STI subclass of PapermillAsset)
# :class_name => "PapermillAsset",
+ # You can use the included join table if you need your assets to be associated to more than one assetable
+ # :through => false,
-
#@@@@@@@@@@@@@@@@@@@ form-helper parameters @@@@@@@@@@@@@@@@@@@@@@@
# You can override all these parameters here, or in your papermill associations definition, or in form-helper calls.
# Helper can generates inline css styling that adapt to your gallery/images placeholder. You can use it to scaffold, then copy the lines you need in your application css and set it to false.
@@ -32,18 +33,16 @@
# :images_only => false,
# Dashboard is only for galleries
# You can remove/change order of HTML elements.
- # See below for dashboard
- # :form_helper_elements => [:upload_button, :container, :dashboard],
-
- # Dashboard elements
- # You can remove/change order of HTML elements. You can add :mass_thumbnail_reset to add a link to reset all thumbnails, although you shouldn't need it.
+ # :form_helper_elements => [:upload_button, :container, :mass_edit],
- # :dashboard => [:mass_edit, :mass_delete ],
+ # Batch edit a single field of all the assets in a form field
+
+ # :mass_edit => true,
# Attributes editable at once for all assets in a gallery
# :mass_editable_fields => ["title", "copyright", "description"],
@@ -175,18 +174,10 @@
#@@@@@@@@@@@@@@@@@ Application-wide parameters @@@@@@@@@@@@@@@@@@@@
- # Default named_scope name for catch-all :papermill declaration
-
- # :base_association_name => :assets,
-
- # Do you want papermill_assets to touch your assetable when CRUDed? (true|false|updated_at_field_name)
-
- # :touch => false,
-
# Set to true to require aliases in all url/path, disabling the
# Don't forget to give an alias value to options[:thumbnail][:style] if true!
# :alias_only => false,
@@ -220,48 +211,8 @@
# you can set it to false if you don't plan to have too many assets. (dangerous)
# :use_id_partition => true,
# If you use those defaults, the first asset will end-up in RAILS_ROOT/public/system/papermill/000/000/001/original/my_first_asset_name.ext
# You'll access it with my_domain.com/system/papermill/000/000/001/original/my_first_asset_name.ext
-
- # You can add authorization support. The code is eval'ed directly in the controller (don't ask why, the answer is full of 'unloadable', 'ApplicationController has been removed from the module tree but is still active', etc.)
-
- # :authorize_create => "true",
- # :authorize_multiple_modification => "true",
- # :authorize_update_and_destroy => "true",
-
- # For example, this is my own setup.
- # adapt the authorization part (can_edit(Assetable)) to your own authorization solution
-
- # :authorize_create => %{
- # unless @assetable.nil? || current_user.can_edit?(@assetable)
- # render :update do |page|
- # page << %{notify("Wrong credentials", "You can't create an asset here", "error");}
- # page.remove params[:Fileid]
- # page.show "papermill_asset_" + @old_asset.id.to_s if @old_asset
- # end
- # false
- # end
- # },
- # :authorize_update_and_destroy => %{
- # unless @asset.try(:assetable).nil? || current_user.can_edit?(@asset.assetable)
- # render :update do |page|
- # page << %{notify("Wrong credentials", "You can't edit or destroy assets here", "error");}
- # end
- # false
- # end
- # },
- # :authorize_multiple_modification => %{
- # authorized = true
- # @assets && @assets.each do |asset|
- # authorized = authorized && current_user.can_edit?(asset.assetable)
- # end
- # unless authorized
- # render :update do |page|
- # page << %{notify("Wrong credentials", "You can't do edit or destroy assets here", "error");}
- # end
- # false
- # end
- # }
}
end
end