search for: last_login_at

Displaying 3 results from an estimated 3 matches for "last_login_at".

2009 Feb 09
3
can't call request.remote_ip from object?
class User def update_metadata self.update_attributes({:last_login_at => Time.now, :last_known_up => request.remote_ip, :last_known_user_agent => request.user_agent}) end This does not work. It bombs out with: undefined local variable or method `request'' for #<User:0x1e146e0> But the...
2006 Jul 08
2
Creating/Saving dependent objects
...*# Other stuff here end* *class Address < ActiveRecord::Base belongs_to :user validates_presence_of :street, :city, :zip end* *class UserController < ApplicationController* * layout "admin"* * def add_user if request.post? @user = User.new(params[:user]) @user.last_login_at = Time.now @user.create_addr(params) begin logger.info("---------------> Saving user object <-----------------") @user.save flash[:notice] = "User **#{@user.username* <#{@user.username>*} created from new function" @user =...
2006 Jul 04
13
NewBie question
Hi, I m very new to Ruby. I bought a book "Ruby on Rails" and I think I understand some concepts. My question is : Is there a way to not use "Cookies" or "Sessions Variables" to keep some information about the user. I ask this question because I would like to prevent some cases where the user browser won''t accept cookies. I m from Asp 3.0, and I