0.0
No commit activity in last 3 years
No release in over 3 years
Link helpers for Devise actions, including user session and registration links.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.4.1

Runtime

>= 1.1.5
~> 1.2.0
~> 0.4.0
 Project Readme

Devise links

View link helpers for Devise actions

Install

gem install devise-links

Alternatively insert into Rails 3 Gemfile:

  gem 'devise-links'

Run $ bundle install in terminal from root of Rails app

Updates

See 'Changelog.txt'

Nov 26, 2010

Major update to make the gem independent of Cream

  • Removed dependency on #auth_labels method in Cream, now uses internal #labels method
  • Added devise:links generator that can generate a 'cream' locale file for the labels used

Usage

The gem adds a set of convenient view helpers that are available inside any Rails view:

  <%= new_registration_link(:role => :admin) %>  
  <%= sign_out_link(:role => :admin, :label => 'Log me out!') %>

Generators

Running the devise:links generator should generate a locale file called 'cream.en.yml' in your Rails app /locales dir.

rails g devise:links

To enable i18n (translations), please set Devise::Links.translate = true fx in a Rails initializer file.

Contributions and more info

See specs for demonstrations of how to use the API etc. To contribute, please enhance by writing specs and then adjusting/enhancing the functionality

TODO

Make API more generic...

  <%= new_registration_link(:admin) %>  
  <%= sign_out_link(:admin, 'Log out') %>  
  <%= new_registration_link('Register!') %>  

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2010 Kristian Mandrup. See LICENSE for details.