Displaying 10 results from an estimated 10 matches for "has_secure_password".
2012 May 13
4
undefined method `key?' for nil:NilClass,bcrypt-ruby,has_secure_password
I''m going through DHH''s Agile Web Development with Rails for Rails 3.1. In
chapter 14 they create a Users sign-in model/view/controller using the
has_secure_password method. My user.rb file looks like this
class User < ActiveRecord::Base
attr_accessible :name, :password_digest, :password, :password_confirmation
validates :name, presence: true, uniqueness: true
has_secure_password
end
now when I go to localhost:3000/users/new I fir...
2013 Oct 18
1
Rails 4 + AngularJs (unembedded client) integration sample
...Of course, everything is just a toy application I use to experiment and
test on various stuff (there''s absolutely no production ready nor
TDD/BDD backed code).
As of now a very basic login/signup feature is implemented and there''s
no structured layout.
Authentication is based on has_secure_password, with auth_token
verification.
Here follows the link to the repository:
https://github.com/CarmineM74/skeleton_app_with_client
I hope it could be of any help.
Regards
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "...
2013 May 19
5
update_attributes() for a single column
...ctiveRecord::Base
before_save { email.downcase! }
validates :name, presence: true, length: { maximum: 50 }
validates :email, presence: true,
format: { with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/
i },
uniqueness: { case_sensitive: false }
has_secure_password
validates :password_confirmation, presence: true
validates :password, length: { minimum: 6 }
end
Rails 4.0.0.beta1, Ruby ruby-2.0.0.0, ruby20-gems-1.8.25
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubs...
2012 May 12
12
before_save messing up
#user.rb ------> Model
class User < ActiveRecord::Base
attr_accessible :email, :name, :password, :password_confirmation
has_secure_password
before_save :create_remember_token
.
.
.
.
.
.
.
private
def create_remember_token
self.remember_token = SecureRandom.urlsafe_base64
end
end
#sessions_controller.rb -------> Sessions Controller
class SessionsController < A...
2012 Sep 18
2
NoMethodError with rake db:migrate
...t; 3.2.1''
# See https://github.com/sstephenson/execjs#readme for more supported
runtimes
# gem ''therubyracer'', :platforms => :ruby
gem ''uglifier'', ''>= 1.0.3''
end
gem ''jquery-rails''
# To use ActiveModel has_secure_password
# gem ''bcrypt-ruby'', ''~> 3.0.0''
# To use Jbuilder templates for JSON
# gem ''jbuilder''
# Use unicorn as the app server
# gem ''unicorn''
# Deploy with Capistrano
# gem ''capistrano''
# To use debugger
# gem...
2012 Aug 18
0
Migrating users from devise to bcrpyt-ruby
Hi guys,
How would one migrate users on a rails site using the devise gem for
authentication to using the bcrpyt-ruby gem(has_secure_password rails
option) for the same? I know that both use bcrpyt, but devise has the
stretches and pepper configurations in the devise.rb file and I''m a little
uninformed on how to translate these for the bcrypt-ruby gem.
Is the pepper configuration in devise an active configuration when using...
2014 Apr 14
0
Foundation & Authlogic
.../turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more:
https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo fil...
2012 May 24
0
Ruby on Rails Tutorial Chapter 6 RSpec tests failing
...of authenticate method
with invalid password [0m Slave(1) run done!
---------------------------------------------------
Here is the user Model:
class User < ActiveRecord::Base
attr_accessible :name, :email, :password, :password_confirmation
attr_accessor :password, :password_confirmation
has_secure_password
before_save { |user| user.email = email.downcase }
validates :name, presence: true, length: { maximum: 50 }
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates :email, presence: true, format: { with:
VALID_EMAIL_REGEX },uniqueness: { case_sensitive: false }
validates :pas...
2014 Apr 23
0
Something went wrong
.../turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more:
https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo f...
2012 Feb 01
10
Very strange problem: Ton's of ruby process just running simple command "rails --version" or "rails
Very strange problem: Ton''s of ruby process just running simple command
"rails --version" or "rails new test1""
I have very strange problem. I try to run this simple command
"rails new test1" --> this suppose to be create a new rails site.
"rails --version" --> even this I got ton''s of ruby process
but I got a lot of ruby