state_machine 0.10.0 was released

Posted About 13 years ago by Lexy.
pluginaweek.org

Now allows to list transition paths from and to arbitrary states.

Ruby and Rails deprecation warnings and how to fix them

Posted About 13 years ago by Ulrich Berkmueller.

Add deprecation warnings and their solution or link to available solutions. Global access to Rake DSL methods is deprecated. Please...

Sanitize user-generated filenames and only send files inside a given directory

Posted About 13 years ago by Thomas Eisenbarth.

If in your application your users pass along params that result in filenames, like invoices/generated?number=123. This could be...

CSS3 Pie: Element not properly redrawn

Posted About 13 years ago by Tobias Kraze.

Pie sometimes does not properly redraw elements upon changes. This often happens when the change comes from somewhere further up...

Speed up response time in development after a Sass change

Posted About 13 years ago by Arne Hartherz.

When working with large Sass files you will notice that the first request after a change to a Sass file...

Synchronize a Selenium-controlled browser with Capybara

Posted About 13 years ago by Henning Koch.

When you click a link or a press a button on a Selenium-controlled browser, the call will return control...

Simple database lock for MySQL

Posted About 13 years ago by Tobias Kraze.

Note: For PostgreSQL you should use advisory locks. For MySQL we still recommend the solution in this card.

How to change MySQL's data directory

Posted About 13 years ago by Arne Hartherz.

Have a backup. Stop MySQL: sudo service mysql stop Move (or copy) your mysql directory. If you want /mnt/mysql to...

HTML5 and Web Video: Questions for the Industry from the Community

Posted About 13 years ago by Lexy.
blogs.msdn.com

What are Google’s plans for turning WebM into a genuinely open standard, one that is based on consensus like...

Speed up file downloads with Rails, Apache and X-Sendfile

Posted About 13 years ago by Henning Koch.

When you use the send_file method to send a local file to the browser, you can save resources on...

Perform HTTP basic authentication in Cucumber (with or without Selenium)

Posted About 13 years ago by Henning Koch.

This card describes a Cucumber step that lets you say: When I perform basic authentication as "username/password" and I visit...

Access the documentation of all locally installed gems

Posted About 13 years ago by Arne Hartherz.

In case https://www.rubydoc.info/ is to slow or offline, you can also read a gem documentation offline. Start a server...

ETags with memcached

Posted Over 13 years ago by Lexy.
opensoul.org

I love ETags, but there’s something that annoys me: most implementations revolve around pulling a record out of a...

Concurrency issues with find-as-you-type boxes

Posted Over 13 years ago by Henning Koch.

Find-as-you-type boxes are usually built by observing changes in a text field, and querying the server via...

Apache: Log the original client IP when your site sits behind a reverse proxy

Posted Over 13 years ago by Henning Koch.

When your site is mapped into the URL-space of another server using mod_proxy, ProxyPass and ProxyPassReverse, all requests...

Apache: Redirect all requests from one host to another

Posted Over 13 years ago by Henning Koch.

In order to redirect all requests from redirecting-host.com to desired-host.com while keeping path and query params unchanged, change your Apache...

How to fix failing controller specs 91% of the time

Posted Over 13 years ago by Arne Hartherz.

If your controller spec never reaches your controller code: Make sure you are signed in. Make sure you are actually...

Use the back button in Cucumber

Posted Over 13 years ago by Thomas Eisenbarth.

In order to go back one page in your Cucumber tests, you can use the following step definition for Capybara...

Useful collection of Sass mixins

Posted Over 13 years ago by Arne Hartherz.

This collection of Sass mixins enables cross-browser styling (including IE with CSS3PIE) with less lines of code.

Bookmarklet to generate a commit message with Pivotal Tracker story ID and title

Posted Over 13 years ago by Henning Koch.

For clarity and traceability, your commit messages should include the ID and title of the Pivotal Tracker story you're...

Aliases for routes

Posted Over 13 years ago by Tobias Kraze.

The following initializer provides an :alias => "my_route_name" option to restful routes in your route.rb. This simply makes the...

Request a non-HTML format in controller specs

Posted Over 13 years ago by Henning Koch.

If a controller action responds to other formats than HTML (XML, PDF, Excel, JSON, ...), you can reach that code in...

Get the current layout's name in a view or partial

Posted Over 13 years ago by Arne Hartherz.

This returns the name (including path) of your current layout: response.layout => "layouts/admin" # inside views that are using the 'admin' layout...

Generate a path or URL string from an array of route components

Posted Over 13 years ago by Henning Koch.

When using form_for you can give the form's target URL either as a string or an array: