18 Aug 2010
Richard Huang
This is a flexible and reusable solution for multiple uploads, using STI model to save all the uploaded assets in one "assets" table and using polymorphic model to reuse "Asset" model in different uploadable models.
Read More
Tags
model
upload
16 Aug 2010
Yincan
override the to_s to make the method sensible instead of "display_name", "format_name"..
Read More
Tags
naming
convention
15 Aug 2010
Richard Huang
Using css sprite can reduce a large number of http requests, so it makes the web page loaded much faster. It it painful to composite a lot of images manually, do it automatically.
Read More
Tags
plugin
performance
css sprite
convention
assets
06 Aug 2010
Ng Tze Yang
For reliable formatting of a date/time string in the desired language, use I18n.localise, Time#strftime can cause u unnecessary headache.
Read More
Tags
I18n
05 Aug 2010
Richard Huang
Rails uses plain/text as the default content_type for sending email, you should change it to multipart/alternative that email clients can display html formatted email if they support and display plain text email if they don't support html format.
Read More
Tags
mailer
31 Jul 2010
Richard Huang
Use asset host for cookie-free domains for components, that make your components load faster.
Read More
Tags
performance
assets
29 Jul 2010
Helmut Juskewycz
Tags
view
render
collection
28 Jul 2010
Eric Anderson
Use YAML's anchor and reference syntax to DRY up your database.yml file.
Read More
Tags
DRY
config
27 Jul 2010
Ng Tze Yang
When a scenario has too many steps, it becomes hard to read & follow. Using nested step helps to clean up the scenario, & helps promote reusability of groups of steps, think of it as code refactoring.
Read More
Tags
cucumber
27 Jul 2010
Ng Tze Yang
Very often, we tend to repeat a number of common steps in all scenarios within a feature, to dry things up, as well as improve readability (helping reader to better focus the intent of each scenario), we can use 'Background'.
Read More
Tags
cucumber