ARTS and page['some_id'].hide

Posted by kev Mon, 11 Sep 2006 00:55:00 GMT

Hi guys. One of the reasons ARTS still doesn’t have support for the square bracket syntax of RJS is that I haven’t thought of a form of assertion I’d like. I think this might work:

assert_rjs :page, 'foo_id', :toggle

:page is used to denote the [] syntax and foo_id is the id of the element we’re working with. All subsequent chained methods follow afterwards as symbols like :toggle.

This example would match page['foo_id'].toggle.

What do you think? Do you have a better idea? Please do give me your thoughts. This is the one major hole in ARTS and I’d like to get it patched up.

Posted in ,  | 1 comment

Comments

  1. Avatar Nathan Witmer said about 2 hours later:
    :[] is a valid symbol in Ruby, so you could also do something like:
    
    assert_rjs :[], 'foo_id', :toggle
    
    :page is less cryptic, but :[] is tied directly to the way you’d be doing the RJS. Either way would be just fine.

Comments are disabled