ICMS Content

ICMS Content contains a group of plugins that add functionality to your models.

Plugins

Audit

The Audit plugin adds the attributes created_by_id and updated_by_id to the model, both referencing the authorizer class specified in IcmsBackend.config.authentication.admin_user_class.

Example:

class Product < ActiveRecord::Base
  icms do
    audit
  end
end

Product.first.created_by
Product.first.updated_by

Hierarchy

TODO:

Metadata

TODO:

Multilanguage

TODO:

Publishable

TODO:

Sortable

The Sortable plugin adds a postion attribute to the model and a positioned scope ordering the collection on this attribute. In the administration interface the position attribute can be managed in the "Sortable" sidebar section of the model.

Example:
class Product < ActiveRecord::Base
  icms do
    sortable
  end
end

Product.first.position = 10
Product.sorted

Visibility

The Visibility plugin adds a visibility range (visible from/to attributes) to a model and a scope visible.

Example:
class Product < ActiveRecord::Base
  icms do
    visibility
  end
end

product = Product.first
product.visible_from = DateTime.now
product.expire_at = DateTime.now + 1.week
Product.visible

results matching ""

    No results matching ""