makandra dev
blog.jquery.com

Two new methods on and off are the new way of declaring event handlers. bind, delegate and live area deprecated...

There are several options, but most of them are impractical. The best way is to use the :ruby filter:

After starting the Rails server in a freshly generated Rails 3.1 project you could see an error message such as...

Clearance is a gem that provides authentication functionality (e.g. login, logout). This note explains, how the clearance login, logout and...

ckeditor.com

Using the jQuery adapter breaks the built-in save function of CKEditor. Phenomenon: The page is submitted correctly, but the...

If you want to know the exact hits on your website (or whatever logfile you want) for a specific date...

The most common use case for Ruby's #collect is to call a method on each list element and collect...

web.archive.org

Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...

blog.bitcrowd.net

When cucumber encounters a failing step in a @javascript feature, the selenium browser window instantly closes. Sometimes you do not...

github.com

ExecJS lets you run JavaScript code from Ruby. It automatically picks the best runtime available to evaluate your JavaScript program...

stackoverflow.com

These methods are available to you: page.driver.browser.switch_to.alert.accept page.driver.browser.switch_to.alert.dismiss page.driver.browser.switch_to.alert.text # the confirmation text Spreewald gives you steps like these:

Remember how Rails 2 came with an awesome feature that broke all code using Time.now or Time.parse? This behavior is...

weblog.rubyonrails.org

jQuery as new default Javascript library, streaming response support, attr_accessible with roles, prepared statements, easier migrations.

If you have a time given in a different time zone than your local one, parsing will convert it for...

We have a big flat screen TV (Samsung LE46c650l1kxxu) in our conference room. Configuring it properly, we were encountering some...

Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...

harvesthq.github.com

Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in...

When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...

en.wikipedia.org

Under the same origin policy, a web page served from server1.example.com cannot normally connect to or communicate with a server...

en.wikipedia.org

Cross-Origin Resource Sharing (CORS) is a browser technology specification, which defines ways for a web service to provide interfaces...

The Javascript code below is a rough equivalent to the simple_format helper that ships with Rails: function simpleFormat(str...

Resque comes with its own dashboard (Resque server) that you can mount inside your Rails 3 application with #config/routes.rb:

Note: While the solution in this card should still work, we prefer another solution now: Hide your Selenium browser window...

In Rails 2, you could use link_to_remote...

...:update => 'id' to automatically replace the content of $('#id').