stffn/declarative_authorization — Issue #122: /authorization_rules parse error with Ruby 1.9 hash syntax
Author: eric-hu
Created: 2012-01-10 03:42:49+00:00
State: open

I see the following error

Showing /home/eric/.rvm/.../gems/declarative_authorization-0.5.3/app/views/authorization_rules/index.html.erb where line #16 raised:

parse error on value ":" (tCOLON)
Extracted source (around line #16):

13: pre.with-notes {padding-left: 35px}
14:
15:

16: <%= policy_analysis_hints(syntax_highlight(h(@auth_rules_script)), @auth_rules_script) %>
17:

When I have this line in my code:

role :guest do
has_permission_on [:groups], to: :show
end

If I change the `to:` to `:to =>`, then all is well.