On 1/25/06, James Adam <[EMAIL PROTECTED]> wrote:
Gah - that SQL is now woefully out of date - I need to remove it.
Thanks, sorry for the confusion :)
- james
On 1/25/06, Steve Odom <[EMAIL PROTECTED]> wrote:
> Thanks James.
>
> I did not use migrations. I created my user table using the below from the
> bottom of the README file:
>
> You need a database table corresponding to the User model. This is provided
> as a Rails Schema file, but the schema is presented below for information.
> <snip>
>
> mysql syntax:
> CREATE TABLE users (
> id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
> login VARCHAR(80) NOT NULL,
> salted_password VARCHAR(40) NOT NULL,
> email VARCHAR(60) NOT NULL,
> firstname VARCHAR(40),
> lastname VARCHAR(40),
> salt CHAR(40) NOT NULL,
> verified INT default 0,
> role VARCHAR(40) default NULL,
> security_token CHAR(40) default NULL,
> token_expiry DATETIME default NULL,
> deleted INT default 0,
> delete_after DATETIME default NULL
> ) TYPE=InnoDB DEFAULT CHARSET=utf8;
>
> This does not contain a logged_in_at field. I think that is my problem.
>
> Steve
>
>
> On 1/25/06, James Adam < [EMAIL PROTECTED]> wrote:
> > The only function that line serves is to track when a particular user
> > logged in, so commenting it out shouldn't be a huge issue.
> >
> > As to *why* it's causing you a problem... the line should simply
> > assign the current time into the logged_in_at field of the user table.
> > Did you use the migrations with the login engine to create your user
> > table? Can you verify that the table has a logged_in_at field?
> >
> > - james
> >
> > On 1/25/06, Steve Odom < [EMAIL PROTECTED]> wrote:
> > > Hi, just installed the LoginEngine.
> > >
> > > I keep getting this error when I log in:
> > >
> > > undefined method `logged_in_at='
> > >
> > >
> > > That is on line 22 of the user_controller:
> > >
> > > def login
> > > return if generate_blank
> > > @user = User.new(params[:user]) # what does this achieve?
> > > if session[:user] = User.authenticate (params[:user][:login],
> > > params[:user][:password])
> > > session[:user].logged_in_at = Time.now
> > > session[:user].save
> > > flash[:notice] = 'Login successful'
> > > redirect_to_stored_or_default :action ="" 'home'
> > > else
> > > @login = params[:user][:login]
> > > flash.now[:warning] = 'Login unsuccessful'
> > > end
> > > end
> > >
> > > It is logging me in. But tripping up because it can't find a logged_in
> > > method.
> > >
> > > If I comment out that line, it works fine. Any ideas what is wrong? And
> > > whether commenting out this line will have consequences?
> > >
> > > Thanks,
> > >
> > > Steve
> > >
> > > _______________________________________________
> > > engine-users mailing list
> > > [email protected]
> > >
> http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
> > >
> > >
> > >
> > _______________________________________________
> > engine-users mailing list
> > [email protected]
> >
> http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
> >
>
>
> _______________________________________________
> engine-users mailing list
> [email protected]
> http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
>
>
>
_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
_______________________________________________ engine-users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
