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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [email protected]
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 [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