Home > acts_as_licensable

acts_as_licensable

Acts_as_licensable is a project mainly written in Ruby, based on the MIT license.

Ruby on Rails 3 licensing plugin

ActsAsLicensable

Provides the ability to add copyright licenses to model objects.

Requires Rails 3.0

Install

$ rails generate acts-as-licensable:migration
$ rake db:migrate
$ rake acts-as-licensable:setup (Required for Development and Production environments, 
                                 installs base set of copyright licenses)

Add to any model you wish to make licensable

acts_as_licensable 

Provides

  • Licensable model instance methods licensed?

  • Helper methods link_to_licensed(licensable, options{}, html_options{})

    Outputs the license name and version. Takes options to customize the license name and version appearance.

    Options: :short_license Displays short version of name (GNU Public License => GPL) :without_version Hides version number

    Example: <%= link_to_licensed book %> => CC Attribution 3.0 <%= link_to_licensed book, :short_license => true %> => <a ...>CC-BY 3.0 <%= link_to_licensed book, :short_license => true, :without_version => true %> => <a ...>CC-BY

Thanks

Partly based on work by Katipo Communications for acts_as_licensed Plugin structure influenced by acts_as_taggable_on

Copyright (c) 2010 Alex Roberts, released under the MIT license

Previous:trial