Skip to content

Commit

Permalink
Add documentation re :validatable
Browse files Browse the repository at this point in the history
  • Loading branch information
MSch committed Sep 12, 2010
1 parent 2c41e14 commit c54fe42
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/generators/devise/twitter_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,27 @@ def inject_devise_twitter_intomodel
# To use devise-twitter don't forget to include the :twitter_oauth module:
# e.g. devise :database_authenticatable, ... , :twitter_oauth
# IMPORTANT: If you want to support sign in via twitter you MUST remove the
# :validatable module, otherwise the user will never be saved
# since it's email and password is blank.
# :validatable checks only email and password so it's safe to remove
CONTENT
end

def copy_initializer
template "initializer.rb", "config/initializers/devise_twitter.rb"
end

def add_devise_twitter_routes
route <<-CONTENT
devise_for :#{singular_name} do
match '/#{singular_name}/sign_in/twitter' => Devise::Twitter::Rack::Signin
match '/#{singular_name}/connect/twitter' => Devise::Twitter::Rack::Connect
end
CONTENT
end

def show_readme
readme "README" if behavior == :invoke
end
Expand Down

0 comments on commit c54fe42

Please sign in to comment.