Displaying 4 results from an estimated 4 matches for "_confirmation".
Did you mean:
confirmation
2011 Jan 02
0
"Confirmation" succeeds when the *_confirmation attribute was neglected from the Model.
<pre>
models/user.rb:
# Oops! I forgot to add the :password_confirmation attribute!
class User < ActiveRecord::Base
attr_accessor :password
attr_accessible :password #, :password_confirmation
validates(:password,
:confirmation => true,
:presence => true)
end
activemodel/lib/active_model/validations/confirmation.rb:
3 # ==...
2007 Dec 05
5
Active Record, Migration, and Translation
...e :people, {display_name => "Personne"} do |t|
t.column :first_name :string, :display_name => "Prénom".
end
Let me explain my point of view:
Rails is a framework made to write programs in English. You see it when
you are confronted to the pluralization rules, or the _confirmation fields.
I think this is okay, because programming Rails without speaking English
is a pain anyway: most of the docs and tutorial available on the web are
in English, and all functions have english name.
But where I think Rails goes a little bit too far, is that it is also
meant to be a lot more...
2005 Oct 14
7
validates_confirmation_of not working
Hello, I''m having a weird problem in my user model. For the
change_password method I have the following:
def change_password(oldpass, newpass, confirmation)
oldpass = self.class.myhash(oldpass)
reload
passhash = self.password
self.password = newpass
self.password_confirmation = confirmation
if valid? and oldpass == passhash
save!
else
# valid? method clears errors so we have to call this after it
errors.add_to_base ''Invalid current password'' unless oldpass == passhash
false
end
end
I also have validates_confirmat...
2006 Mar 14
4
validates_confirmation_of has stopped working
Hi Railers,
I''m past considering myself a noob in Rails land - I think what I''m up against
here is more of a bug or an anomaly that I''m unaware of (or that has changed
in a recent version).
I had a fully working validates_confirmation_of :email_address field in my app
- was one of the first things I set up, extremely simple, been working for a
long time.
Then one day I notice that it''s not working any more - the validator basically
doesn''t care if you fill in the email_address field but not
email_address_c...