Sha256: 9d06d9ac9c5e97c23bad2819231ed9a70d91df1fc3f35599cac9c4601dff52bc

Contents?: true

Size: 1.75 KB

Versions: 21

Compression:

Stored size: 1.75 KB

Contents

Description:
    Generates a user model, users controller, and sessions controller. The 
    users controller handles the registration and the sessions controller 
    handles authentication. This is similar to restful_authentication, but 
    simpler.
    
    IMPORTANT: This generator uses the "title" helper method which is generated
    by the nifty_layout generator. You may want to run that generator first.

Usage:
    If you do not pass any arguments, the model name will default to "user", and
    the authentication controller will default to "sessions". You can override
    each of these respectively by passing one or two arguments. Either name can
    be CamelCased or under_scored.

Examples:
    script/generate nifty_authentication
        
        Creates user model, users_controller, and sessions_controller.
    
    script/generate nifty_authentication account
    
        Creates account model, accounts_controller, and sessions_controller.
    
    script/generate nifty_authentication Account CurrentSession
    
        Creates account model, accounts_controller, and current_sessions_controller.

Methods:
    There are several methods generated which you can use in your application.
    Here's a common example of what you might add to your layout.
    
      <% if logged_in? %>
        Welcome <%= current_user.username %>! Not you?
        <%= link_to "Log out", logout_path %>
      <% else %>
        <%= link_to "Sign up", signup_path %> or
        <%= link_to "log in", login_path %>.
      <% end %>
    
    You can also restrict unregistered users from accessing a controller using
    a before filter. For example.
    
      before_filter :login_required, :except => [:index, :show]
    
    See the generated file lib/authentication.rb for details.

Version data entries

21 entries across 21 versions & 5 rubygems

Version Path
intinno-nifty-generators-0.2.5 rails_generators/nifty_authentication/USAGE
polly-nifty-generators-0.2.3 rails_generators/nifty_authentication/USAGE
rubycs-nifty-generators-compass-0.0.1 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.2.5 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.2.6 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.2.7 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.2.8 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.2.9 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.3.0 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.3.1 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.3.2 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.3.3 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.3.4 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.3.5 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.3.6 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.3.7 rails_generators/nifty_authentication/USAGE
twilson63-nifty-generators-0.3.8 rails_generators/nifty_authentication/USAGE
nifty-generators-0.2.2 rails_generators/nifty_authentication/USAGE
nifty-generators-0.2.4 rails_generators/nifty_authentication/USAGE
nifty-generators-0.2.3 rails_generators/nifty_authentication/USAGE