lib/generators/adauth/sessions/sessions_generator.rb in adauth-1.0.0 vs lib/generators/adauth/sessions/sessions_generator.rb in adauth-1.0.1

- old
+ new

@@ -1,10 +1,18 @@ module Adauth module Generators + + # Generates the sessions controller class SessionsGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :model_name, :type => :string, :default => "user" + # Generates the sessions controller + # + # Called as: + # rails g adauth:sessions + # + # Has 1 optional input of "model_name", which needs to be set the the model that include Adauth::UserModel def generate_sessions template "sessions_controller.rb.erb", "app/controllers/sessions_controller.rb" template "new.html.erb", "app/views/sessions/new.html.erb" route "resources :sessions" route "match \"/adauth\" => \"sessions#create\""