Much of the work over the past week was done in paperclip, so now you can upload files to your Rails apps with more flare and style!
It now supports an option for keeping old files, so you can pass
has_attached_file and, when you destroy an attachment (
@user.avatar.destroy) it won’t actually delete the underlying files (345ec74). Many people find this useful for S3 storage, which hints that there may be a deeper problem elsewhere. This is thanks to Eike Bernhardt (teefax) but was originally
I’ve long wanted a migration helper, and Daniel Schierbeck (dasch) wrote it with some git cleanup from Alexey Mahotkin (693b528, b922111, f82c0d9, f3eacd2, e0a6732, ffbfc24, b70ffbc, 65a6ae8). It looks like this:
class AddAvatarColumnsToUser < ActiveRecord::Migration def self.up change_table :users do |t| t.has_attached_file :avatar end end def self.down drop_attached_file :users, :avatar end end
There were also some important internal changes. For example, Prem Sichanugrist (sikachu) replaced the AWS::S3 gem with AWS::SDK (1df1b03, 81129ad, 88a8af9, 75f413d, 2cf7378). He called out AWS (amazonwebservices) and Trevor Rowe (trevorrowe) for helping, and John Joseph Bachir (jjb) updated the docs appropriately (308f1a0).
Prem also got Paperclip passing on Rubinius (001fd99).
Dimitrij Denissenko (dim) handled the case where using the
:id_partition pattern in a URL or path pattern raises a
NoMethodError on an unsaved resource (ac82244). He and I are now enemies for life for his use of
Prem fixed another bug: if you have a path or URL pattern with
:class in it it will show a warning. He removed this warning (b4ff2c5).
The fake credit card processor, fake_braintree, hit 0.0.6 (eed875e and 0934f1e) this week as Ben Orenstein (r00k) added support for discounted subscriptions (757c0aa) and Gabe Berke-Williams (gabebw) exposed the transactions that have run (8dde09c and ab93137).
Taking a stance on whether we play along with the little Open Directory Project game, suspenders now defaults to
NOODP on every page which, as Matt Jankowski (mjankowski) points out, tells Web crawlers to never bother looking for ODP details (6275d0f).
The sweet shoulda-matchers collection of RSpec matchers now has more accurate error messages for the
allow_value matcher (25c2623), thanks to Clemens Helm (clemenshelm). It uses the underlying internationalization information to generate this.
Another documentation update on bourbon as Phil LaPier (plapier) explained that multiple background images with shorthand notation are unsupported (798aa1c), after clarifying that multiple background images themselves have fancy comma-separated syntax (aa66831).