Loading...

haml@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[haml] Sample not working... Anton Wed Jan 14 13:00:17 2009

Hi!

I just tried to use haml and xss-shield. But every time I try to
render a tag with a dynamic text the following happens:

%p= "hello"

renders to

ArgumentError (wrong number of arguments (6 for 2)):
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/
precompiler.rb:633:in `push_script'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/
precompiler.rb:633:in `render_tag'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/
precompiler.rb:192:in `process_line'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/
precompiler.rb:156:in `precompile'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/attribute_methods.rb:211:in `each_with_index'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/
precompiler.rb:122:in `each'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/
precompiler.rb:122:in `each_with_index'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/
precompiler.rb:122:in `precompile'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/engine.rb:
100:in `initialize'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/template/
plugin.rb:21:in `new'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/template/
plugin.rb:21:in `compile'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/
template_handler.rb:11:in `call'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/
renderable.rb:21:in `_unmemoized_compiled_source'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/memoizable.rb:57:in `compiled_source'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/memoizable.rb:25:in `__send__'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/memoizable.rb:25:in `memoize_all'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/memoizable.rb:22:in `each'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/memoizable.rb:22:in `memoize_all'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/memoizable.rb:17:in `freeze'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/memoizable.rb:70:in `_pick_template'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/
base.rb:256:in `render_without_haml'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/helpers/
action_view_mods.rb:14:in `render_without_xss_protection'
    /vendor/plugins/xss-shield/lib/xss_shield/secure_helpers.rb:8:in
`send'
    /vendor/plugins/xss-shield/lib/xss_shield/secure_helpers.rb:8:in
`render_with_xss_protection'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/
base.rb:371:in `render'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/
base.rb:371:in `_render_with_layout'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/
base.rb:254:in `render_without_haml'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/haml/helpers/
action_view_mods.rb:14:in `render_without_xss_protection'
    /vendor/plugins/xss-shield/lib/xss_shield/secure_helpers.rb:8:in
`send'
    /vendor/plugins/xss-shield/lib/xss_shield/secure_helpers.rb:8:in
`render_with_xss_protection'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:1174:in `render'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:1174:in `render_for_file'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:896:in `render_without_benchmark'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:51:in `render'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/core_ext/benchmark.rb:8:in `realtime'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:51:in `render'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:868:in `render_without_benchmark'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:51:in `render'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/core_ext/benchmark.rb:8:in `realtime'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:51:in `render'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:1248:in `default_render'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:1254:in `perform_action_without_filters'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:617:in `call_filters'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:610:in `perform_action_without_benchmark'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
    /opt/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/rescue.rb:136:in `perform_action_without_caching'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/caching/sql_cache.rb:13:in `perform_action'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/connection_adapters/abstract/query_cache.rb:34:in
`cache'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/query_cache.rb:8:in `cache'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/caching/sql_cache.rb:12:in `perform_action'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:524:in `send'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:524:in `process_without_filters'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:606:in
`process_without_session_management_support'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/session_management.rb:134:in `sass_old_process'
    /opt/local/lib/ruby/gems/1.8/gems/haml-2.0.6/lib/sass/plugin/
rails.rb:19:in `process'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:392:in `process'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:183:in `handle_request'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:110:in `dispatch_unlocked'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:123:in `dispatch'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:122:in `synchronize'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:122:in `dispatch'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:132:in `dispatch_cgi'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:39:in `dispatch'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:76:in `process'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:74:in `synchronize'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:74:in `process'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
159:in `process_client'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
158:in `each'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
158:in `process_client'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in `run'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in `initialize'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in `new'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in `run'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
268:in `initialize'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
268:in `new'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
268:in `run'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:282:in `run'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:281:in `each'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:281:in `run'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:
128:in `run'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
command.rb:212:in `run'
    /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:
281
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:142:in
`load_without_new_constant_marking'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:142:in `load'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:521:in `new_constants_in'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:142:in `load'
    /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/
mongrel.rb:64
    /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
    /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:153:in `require'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:521:in `new_constants_in'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:153:in `require'
    /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/
server.rb:49
    /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
    /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
    script/server:3

Thank you very much in advance!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---