[Rails] Can rails make use of accesskeys?
Morten Liebach
m at mongers.org
Sun Jan 1 18:25:32 GMT 2006
On 2006-01-01 15:36:49 +0000, Justin Forder wrote:
> 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:
[snip]
> save, view in browser - I can navigate through that link either by
> clicking on it or by using Ctrl-g
Yes, Ctrl is the modifier in Safari.
> This is using Locomotive 1.0
I'm using Darwinports and gem installed RoR and I've been having some
trouble with extra HTML attributes too, and I found out the {}'s are
significant:
<%= link_to "Goodbye!", {:action => "goodbye"}, :accesskey => "g",
:title => "Bye bye!" %>
Works. Whereas this:
<%= link_to "Goodbye!", :action => "goodbye", :accesskey => "g",
:title => "Bye bye!" %>
Doesn't work, instead it generates a link pointing to
"/say/goodbye?accesskey=f&title=Bye+bye%21".
It's probably obvious why, and I think I know the reason. I expect to
be sure sometime later in Agile Web Dev w. RoR, I'm just too much of a
newbie to take my chances explaining it yet in public. :-)
Anyway, Bruce, this might be the same problem you're having. Maybe not.
Have a nice day
Morten
--
http://m.mongers.org/weblog/
More information about the Rails
mailing list