Session Problem

13 views
Skip to first unread message

Deepak Sharma

unread,
Jan 18, 2015, 2:13:54 PM1/18/15
to rubyonra...@googlegroups.com
Hello,

I am creating an application regarding the book in which the user can read the content of the book. I want the user should be automatically redirect to the login page after the interval of 30 seconds while reading the book. For login / logout I'm using Devise. I have created a new controller named "pustak_controller.rb" for the purpose of session. I am totally new to this. I have tried to create the follow login [0] but it gives me an error  " undefined method `-' for nil:NilClass ". Please help and tell me where I am going wrong.

[0] : https://gist.github.com/anonymous/af583d45ebe6709e89e4

Colin Law

unread,
Jan 18, 2015, 4:49:22 PM1/18/15
to rubyonra...@googlegroups.com
On 18 January 2015 at 19:13, Deepak Sharma <deeky....@gmail.com> wrote:
> Hello,
>
> I am creating an application regarding the book in which the user can read
> the content of the book. I want the user should be automatically redirect to
> the login page after the interval of 30 seconds while reading the book. For
> login / logout I'm using Devise. I have created a new controller named
> "pustak_controller.rb" for the purpose of session. I am totally new to this.

If you have not already done so then I suggest starting by working
right through a good tutorial such as railstutorial.org (which is free
to use online). That will show you the basics of rails.

Note that for your automatic redirect after 30 seconds I think you
will have to use javascript.

Colin
Reply all
Reply to author
Forward
0 new messages