Feeds:
Posts
Comments

Archive for June, 2008

PaperClip and Rails 2.1

These are a couple of quick tips for using PaperClip 2.1.2 and Rails 2.1. I don’t know if there is a difference with other version combinations.
For security reasons, you may want to store your attachment out of the public directory:
class DocumentVersion < ActiveRecord::Base
belongs_to :document
has_attached_file :version,
:path => [...]

Read Full Post »

Timestamped Migrations

<update>As soon as I figure out how, I will be submitting a patch to Rails to make this an option. I would like to use something like:
config.active_record.timestamped_migrations = true
This was suggested in a comment by hardbap referencing the announcement of this post. I agree with idea, but think the default should be false [...]

Read Full Post »

I’ve never liked the idea of timestamped migrations, still don’t. So, not to my surprise, this was the first (and only) thing that bit me when testing the Lockdown generators against the latest release of Rails (2.1).
What happened? Well, the Lockdown generator generates 5 migrations, and contrary to all the speed talk surrounding [...]

Read Full Post »