#20 √ wontfix
Clemens Kofler

Minor inconsistence with column names

Reported by Clemens Kofler | June 27th, 2008 @ 10:05 AM

I have a small suggestion regarding the names of Paperclip's column names.

It so happens that I have a model named Attachment in my application because each Entry has_many :attachments. Now, whichever way I put it, it looks kinda awkward:

class Attachment < ActiveRecord::Base
  has_attached_file :attachment
end

When following conventions, this gives me @attachment.attachment.

class Attachment < ActiveRecord::Base
  has_attached_file :file
end

@attachment.file looks good - but @attachment.file_file_size doesn't (and neither does @attachment.file_file_name).

Just for better naming, I'd suggest removing the "file" in both cases. This would give us @attachment.file_size and @attachment.file_name. Plus, it would be more consistent, giving that the third column doesn't contain the word "file".

As I said - nothing major, but it might increase readability.

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket