makaroni4/Mongoid-carrierwave-mini_magick-crop — pull request #1 by LarryLv (2012-05-11 19:03:35+00:00)
Title: crop image after_update user

```
def crop
path = RAILS_ROOT + "/public" + self.profile_url
thumb_path = RAILS_ROOT + "/public" + self.profile.thumb.url
system "convert #{path} -crop #{self.crop_h.to_i}x#{self.crop_w.to_i}+#{self.crop_x.to_i}+#{self.crop_~
puts "#{self.crop_w.to_i}x#{self.crop_h.to_i}+#{self.crop_y.to_i}+#{self.crop_x.to_i}"
end
```

the *crop* method uses a system function which is probably not a good way.

I replace it with `profile.recreate_versions!`

:-)