Ruby on Rails Friday, December 30, 2011

On Fri, Dec 30, 2011 at 7:40 AM, César <cesare.diaz@gmail.com> wrote:

>            Devise will expire session in the time that you put in
> 'config/initializers/devise.rb' with
>
> config.timeout_in = 5.minutes
>
> but this won't redirect your app automatically to the login page, so,
> you would need some javascript function to solve this.

Alternatively, just include a meta-refresh tag in every page pointing to
your login page, with the appropriate timeout as the refresh interval.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Previous versions of Rails, I could just...

(app/helpers/application_helper.rb)
def set_focus_to_id(id)
javascript_tag("$('#{id}').focus()");
end

then in any view, do something like
<%= set_focus_to_id 'user_uid' %>

but this doesn't work in Rails 3.1.x

What is the new preferred method for doing this?

--
Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Also, check out [whenever](https://github.com/javan/whenever)

On Fri, Dec 30, 2011 at 10:55 AM, Peter Hickman
<peterhickman386@googlemail.com> wrote:
> That way the crons can also be maintained when you use capistrano and
> they will be deployed to new machines if needed. It makes a great deal
> of sense to bundle the application specific crons with he application
> itself.
>
> --
> 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 rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.