Is it maybe because it's a nested resource?

I have this in users_controller.rb
-----------------------------------------
@user = @company.users.build(params[:user])
@user.invitation_last_sent_at = Time.now
@user.invitation_last_sent_to = ???????
------------------------------------------------------

I just tried @company.users[0].email and it also doesn't work.

--------------------------------------------------------------------
Started POST "/companies/45/users" for 127.0.0.1 at Thu Aug 11 15:37:28 
-0500 2011
  Processing by UsersController#create as HTML
  Parameters: {"commit"=>"Add this person", 
"authenticity_token"=>"2sp49Lxt9a533aBCwdmiCAOmDSyfkO83dHpGI5JRFEE=", 
"utf8"=>"✓", "company_id"=>"45", "user"=>{"title"=>"", 
"last_name"=>"Mini-Me", "first_name"=>"Leo", 
"email"=>"[email protected]"}}
-----------------------------------------------------------------

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to