Automatically finds ActiveRecord objects with permalink
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
MIT-LICENSE
README.rdoc
railhead_permalink.gemspec

README.rdoc

RailheadPermalink

RailheadPermalink is a Ruby on Rails plugin that automatically finds ActiveRecord objects with permalink.

Installation

Add to your Gemfile:

gem 'railhead_permalink'

Usage

Add permalink field to your schema:

t.string :permalink

Setup permalink for your ActiceRecord object:

auto_permalink :title

You can setup reserved names too:

auto_permalink :title, reserved_names: %w(reserved names)

You can keep already existing permalinks:

auto_permalink :title, keep_existing: true

License

Copyright © 2008-2015 Bence Nagy (bence.nagy@gmail.com), released under the MIT license.