Displaying 11 results from an estimated 11 matches for "activated_at".
2007 Mar 12
2
utc
I''m having a helluva time getting Date.today.utc to resolve -
"undefined method `utc'' for #<Date: 4908343/2,0,2299161>"
model usage in before_create filter is :
activated_at = Date.today.utc
I''m not stubbing out Date (should I be? [ stub(Date, :utc =>
Date.today) didn''t help any ].
The before filter is working fine within the app, but rspec isn''t
happy. Should I include something particular?
Thanx for any help.
Jodi
-------------...
2007 May 06
5
Comparing polymorphic property to same object fails
...of users to tasks in a task management
application. If the user issuing the invitation is the user being
invited (ie the user assigned themselves to a task), I want to
activate the invitation immediately in the model.
The trouble is that this:
if self.assignable == self.created_by
self.activated_at = Time.now
self.activation_code = nil
end
fails to detect equality correctly. I''ve tried ===, eql? etc.
When I look at .__id__ when I know that I set assignable equal to
created_by, the values are different (wildly so; one is like 4 and the
other is a five digit number or somet...
2008 Jun 29
3
Working around/with Restful Authentication
...9;', :password_confirmation => ''123456'')
=> #<User id: nil, login: nil, email: "user-n8tE+Mx9DRM@public.gmane.org",
crypted_password: nil, salt: nil, created_at: nil, updated_at: nil,
remember_token: nil, remember_token_expires_at: nil, activation_code:
nil, activated_at: nil, is_seller: false>
>> u.save
=> false
Any clues as to how I could create a user without actually being sent
to the user controller''s create action? The before_save and
before_create actions are private.
Thanks,
Nik
--~--~---------~--~----~------------~-------~--~----~
Yo...
2007 Jul 23
2
Acts_As_Ferret: disable_ferret and Callbacks
...e callbacks aren''t quite working right.
Here''s a code sample:
class Model < ActiveRecord::Base
has_one :associated_model # This model will fill in some fields upon
it''s own validation
def save_with_activation_handling!
if active? # This part works
self.activated_at = Time.now
else
disable_ferret :once
self.activated_at = nil
end
save_without_activation_handling!
end
alias_method_chain :save!, :activation_handling
end
Any ideas?
Thank you,
James Herdman
--
Posted via http://www.ruby-forum.com/.
2006 Apr 12
3
acts_as_authenticated trouble
...there
really isn''t too much documentation. I have the newest version of
rails,ruby, and acts_as_authenticated installed.
#The setup
I set up the acts_as_authenticated in the following manner.
*created a table called "accounts" in the database. (minus the
activation_code and activated_at fields)
*used the generator to "script/generate authenticated account account"
*followed the instructions in the README to include AuthenticatedSystem
in my application files.
#the problem
The controllers, views, and models all work fine. The user is directed
to ''/signup...
2008 Feb 07
1
ActiveRecord 'find_or_initialize_by' dynamic finder bug? Ignoring conditions.
...39;) LIMIT 1
=> #<User id: 2, login: nil, email: "foo-+RB1Aph5k6s@public.gmane.org", crypted_password:
nil, salt: nil, created_at: "2008-02-07 00:48:48", updated_at:
"2008-02-07 00:48:48", remember_token: nil, remember_token_expires_at:
nil, activation_code: nil, activated_at: nil, state: "passive",
deleted_at: nil, password_reset_at: nil, forgot_password_code: nil,
name: nil, beta_code: nil, beta_approved_at: nil>
Thanks,
Glenn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups...
2007 Oct 15
6
SQL injection with :order, :limit, :group
I know how to avoid SQL injection attacks when you use :conditions
User.find :first, :conditions => ["login=?", params[:username]]
but how about with :order, :limit or :group?
# uh-oh...spaghetti-oh
User.find :first, :order => "login; delete from users; select * from users"
Pat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you
2006 Jan 12
0
generating user table with Acts_as_authenticated
...email", :string, :limit => 100
t.column "crypted_password", :string, :limit => 40
t.column "salt", :string, :limit => 40
t.column "activation_code", :string, :limit => 40 # only if you want
t.column "activated_at", :datetime # user activation
t.column "created_at", :datetime
t.column "updated_at", :datetime
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails...
2010 Oct 11
5
Object lost in memory/trashed?
...11 00:44:02
title: ""
commentable_type: Diagram
commentable_id: "29"
updated_at: 2010-10-11 00:44:02
id: "41"
user_id: "2"
attributes_cache:
created_at: 2010-10-11 00:44:02 Z
--- !ruby/object:User
attributes:
created_at: 2010-05-23 18:31:02
activated_at: 2010-06-08 22:23:19
send_news: "1"
remember_token_expires_at:
updated_at: 2010-09-19 22:36:42
activation_code:
old_email:
id: "2"
saved_once: "1"
email_hash: 672585615_3008d2bf2e8e7f4455d48212f99a9343
remember_token:
short_name: olance
diagrams_c...
2008 Aug 28
12
Rendering User attributes in XML
Let''s say an app has a User, and a User has many friends. Also, let''s
say the app authentication was built on the restful_authentication
plugin, and we have email and password in the Users table. The friends
controller index might look like this;
# GET /users/1/friends
# GET /users/1/friends.xml
def index
@users = @user.friends
respond_to do |format|
format.html
2006 Jan 31
13
Acts_as_authenticated
Hello
I have been trying a number of security/login generators recently. My
favourite so far is the Acts_as_authenticated. I like the fact that it
is only billed as a starting point and doesn''t try to do everything.
I would like to add security roles to it, so that some of my controller
actions can only be used by an admin role. Has anybody implemented this
using