[Rails] Can rails make use of accesskeys?

Justin Forder justin at justinforder.me.uk
Sun Jan 1 15:36:49 GMT 2006


Bruce Balmer wrote:

> Justin:
> 
> Yes. I am. I have also tried the command key, the option key, the  shift 
> key and all possible permutations of them.  I read a couple of  comments 
> on the web which indicate that access keys are not working  in Safari 
> although apple seems to think they are.  But I can't really  find 
> anything definitive.  I am hoping that someone who is using  Safari can 
> confirm they ARE working and tell me how they do it.

That's strange - I tried this with Safari on Tiger before replying, by 
making a small modification to a toy application in Locomotive, and then 
retyped the relevant line in my message on a Windows machine.

Let me do this from scratch:

in Locomotive, new application "bruce"

open Terminal in this application, and use

$ script/generate controller say hello goodbye

run the application (it's on port 3003 for me)

preview app in browser, and check that I see the placeholders for the 
hello and goodbye pages

http://localhost:3003/say/hello
http://localhost:3003/say/goodbye

Open TextMate on the project, and edit app/views/say/hello.rhtml
to include

<%= link_to 'Goodbye', {:action => 'goodbye'}, :accesskey => 'g' %>

save, view in browser - I can navigate through that link either by 
clicking on it or by using Ctrl-g

This is using Locomotive 1.0

regards

   Justin




More information about the Rails mailing list