needless to say that if I remove :value=>"" from the input field below
the view renders.
%input#member_login{:type=>"text", :name=>"member[login]", :size=>"30",
:value=>""}
This had actually been a generated .rhtml file I was started to
practice with using haml by manually converting...
Cheerio, Harry.
On Nov 7, 9:07 pm, Harry <[EMAIL PROTECTED]> wrote:
> Hi Nathan:
>
> thanks - am still learning haml as you can see ;-)
>
> Narrowed it down to the followin. It breaks because nil is added to
> the result, which is difficult to sort... Hope this helps.
>
> Cheerio, Harry.
>
> 680 end
> 681 end
> 682 " #{a}=#{attr_wrapper}#{v}#{attr_wrapper}"
> 683 end
> 684 end
> => 685 result.sort.join
> 686 end
> 687
> 688 def prerender_tag(name, atomic, attributes)
> 689 if atomic
> (rdb:25) pp result
> [" name='member_login'",
> " size='30'",
> " type='text'",
> " id='member_login'",
> nil]
> (rdb:25)
>
> On Nov 7, 8:46 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>
> > Could you narrow that down to the smallest view that still breaks?
>
> > Also, you don't need to write "- end" after a method that takes a block.
> > You can just indent the code in the block. For example:
>
> > - 3.times do
> > %p Hello!
> > %p Goodbye!
>
> > That renders as
>
> > <p>Hello!</p>
> > <p>Hello!</p>
> > <p>Hello!</p>
> > <p>Goodbye!</p>
>
> > Same goes for stuff like if and while.
>
> > Harry wrote:
> > > Hi Nathan,
>
> > > it's a pretty simple view - here it is.
>
> > > Cheerio, Harry.
>
> > > = stylesheet_link_tag "joes"
> > > - form_tag :action=>"signup" do
> > > #signupform.form{ :title => "Account signup" }
> > > %h3 Signup
> > > = error_messages_for 'member'
>
> > > %label{ :for=>"member_login"} Desired login:
>
> > > %input#member_login{:type=>"text", :name=>"member[login]", :size=>"30",
> > > :value=>""}
> > > %br
> > > %label{ :for=>"member_password"} Choose password:
>
> > > %input#member_password{:type=>"password", :name=>"member[password]",
> > > :size=>"30"}
> > > %br
> > > %label{ :for=>"member_password_confirmation"} Confirm password:
>
> > > %input#member_password_confirmation{:type=>"password",
> > > :name=>"member[password_confirmation]", :size=>"30"}
> > > %br
>
> > > %input#submit.primary{:type=>"submit", :name=>"signup", :value=>"Signup
> > > »"}
> > > - end
>
> > > On Nov 6, 11:31 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>
> > >> This looks like a problem with a change I committed a bit ago. What's
> > >> the template code that's causing this to break?
>
> > >> - Nathan
>
> > >> Harry wrote:
>
> > >>> Hi there:
>
> > >>> after bringing all my gems and the ruby installation up-to-date my
> > >>> tests fail with "ActionView::TemplateError: comparison of String with
> > >>> nil failed". The stack trace is below - does that sound familiar to
> > >>> anyone?
>
> > >>> haml (stable) plugin is at revision 610, rails is at 1.2.5 and ruby is
> > >>> at 1.8.6 (2007-09-23 patchlevel 110) [powerpc-darwin8.10.0].
>
> > >>> Thanks, Harry.
>
> > >>> method sort in engine.rb at line 685
> > >>> method build_attributes in engine.rb at line 685
> > >>> method prerender_tag in engine.rb at line 695
> > >>> method render_tag in engine.rb at line 752
> > >>> method scan in engine.rb at line 702
> > >>> method render_tag in engine.rb at line 702
> > >>> method process_line in engine.rb at line 312
> > >>> method do_precompile in engine.rb at line 254
> > >>> method each_with_index in base.rb at line 1943
> > >>> method each in engine.rb at line 229
> > >>> method each_with_index in engine.rb at line 229
> > >>> method do_precompile in engine.rb at line 229
> > >>> method initialize in engine.rb at line 173
> > >>> method new in template.rb at line 62
> > >>> method render in template.rb at line 62
> > >>> method delegate_render in base.rb at line 419
> > >>> method render_template_old in base.rb at line 299
> > >>> method render_template in template.rb at line 96
> > >>> method render_file in base.rb at line 260
> > >>> method render_file in base.rb at line 812
> > >>> method render_with_no_layout in base.rb at line 717
> > >>> method render_without_benchmark in layout.rb at line 247
> > >>> method render in benchmarking.rb at line 50
> > >>> method measure in benchmark.rb at line 293
> > >>> method render in benchmarking.rb at line 50
> > >>> method perform_action_without_filters in base.rb at line 1102
> > >>> method call_filters in filters.rb at line 696
> > >>> method perform_action_without_benchmark in filters.rb at line 688
> > >>> method perform_action_without_rescue in benchmarking.rb at line 66
> > >>> method measure in benchmark.rb at line 293
> > >>> method perform_action_without_rescue in benchmarking.rb at line 66
> > >>> method perform_action in rescue.rb at line 83
> > >>> method send in base.rb at line 435
> > >>> method process_without_filters in base.rb at line 435
> > >>> method process_without_session_management_support in filters.rb at
> > >>> line 684
> > >>> method sass_old_process in session_management.rb at line 114
> > >>> method process_without_test in plugin.rb at line 124
> > >>> method process in test_process.rb at line 15
> > >>> method process in test_process.rb at line 385
> > >>> method post in test_process.rb at line 356
> > >>> method test_bad_signup in member_controller_test.rb at line 43
> > >>> method __send__ in testcase.rb at line 78
> > >>> method run in testcase.rb at line 78
> > >>> method run in testsuite.rb at line 34
> > >>> method each in testsuite.rb at line 33
> > >>> method run in testsuite.rb at line 33
> > >>> method run in testsuite.rb at line 34
> > >>> method each in testsuite.rb at line 33
> > >>> method run in testsuite.rb at line 33
> > >>> method run_suite in testrunnermediator.rb at line 46
> > >>> method start_mediator in testrunner.rb at line 67
> > >>> method start in testrunner.rb at line 41
> > >>> method run in testrunnerutilities.rb at line 29
> > >>> method run in autorunner.rb at line 216
> > >>> method run in autorunner.rb at line 12
> > >>> at top level in unit.rb at line 278
> > >>> at top level in rake_test_loader.rb at line 5
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---