Markaby Gotcha

One thing to watch out for, when using Markaby:

  link_to_remote 'whatever', :url => some_path(@something), :before => do_this, :complete => do_that

will not work.

Instead you need:

  link_to_remote 'whatever', :url => some_path(@something).to_s, :before => do_this, :complete => do_that

Spot the difference? The :url parameter has a .to_s appended on the end. Otherwise Markaby intercepts the call and eats the output.

This entry was posted on Monday, April 23rd, 2007 at 10:12 am and is filed under Designing Great Software, Ruby on Rails and Software Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply