Flexible plans executed via iterative development are at the core of Agile : Welcome changing requirements, even late in development. Agile processes harness change for the customer’s competitive advantage. This is great for figuring out what to build, but all this flexibility can mak...

The cache_digests gem (also included in Rails 4) will automatically add a digest to the fragment cache key based on the template. If a template changes the cache will auto-expire. But watch out for the gotchas!

Topic: Best practices for open sourcing your rails app and using git I want to: * Use git as my version control * Work in development branches and merge them into master * Frequently push changes to a public, open source git repository (eg Github) * Be able to deploy to Heroku The pro...

I'm sure you will get a variety of different takes. There are a few items that are worthy of considerations, such as: o - Do you prefer working with a lightweight or a heavyweight widget set? In other words, some widget sets go down to the "bare metal" while others sit atop the native...

Action View templates can be written in several ways. If the template file has a .erb extension then it uses a mixture of ERb (included in Ruby) and HTML . If the template file has a .builder extension then Jim Weirich’s Builder::XmlMarkup library is used.

So to inject arbitrary SQL, you need to tamper with the cookie, which requires the HMAC key. The HMAC key is the so-called session secret . As the name implies, it is supposed to be secret. Rails generates a random 512-bit secret upon project creation. This is why most Rails apps that...

Related:

“and” vs && and “or” vs || in Ruby By Peter Cooper / August 3, 2010 If you use Ruby long enough, you will discover the and and or operators. These appear at first glance to be synonyms for && and || . You will then be tempted to use these English oprators in place of && and || , for t...

Calling Methods on Potential Nil Objects in Rails By Raymond Law November 2, 2010 in rails Rails adds a pretty cool Object#try method. From Rails doc: try(method, *args, &block) This Invokes the method identified by the symbol method, passing it any arguments and/or the block specifie...

We first "warm up" the participant by sending 1000 requests with 12 concurrent users to it. This gives the participant the chance to load whatever resources are necessary. This is done with the Apache benchmarking tool: ab -n 1000 -c 12 ... Next, we send 20.000 requests in total, usin...