{"push_id":1391127461,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"9928a02519009fcc43958f391966f5a078cf3d33","before":"42a433190c0fcb1fa99472ff5dacb67623e630b2","commits":[{"sha":"f01e820127adcba37be1910c63ffde9537a74147","author":{"name":"Janko Marohnić","email":"abca1832175625e175a699db65e26683ea626451@gmail.com"},"message":"Improve backgrounding documentation","distinct":true,"url":"https://api.github.com/repos/janko-m/shrine/commits/f01e820127adcba37be1910c63ffde9537a74147"},{"sha":"9928a02519009fcc43958f391966f5a078cf3d33","author":{"name":"Janko Marohnić","email":"abca1832175625e175a699db65e26683ea626451@gmail.com"},"message":"Support plain models in backgrounding plugin\n\nPreviously the backgrounding plugin only worked for model instances that\nrepresent database records. It relied on `Attacher.find_record` being\ndefined, which comes with ORM plugins.\n\nHowever, Shrine can be also used with plain models, and there is no real\nreason not to support that in backgrounding plugin as well. It only wouldn't\nbe possible if Shrine was obtaining the cached file from the database,\nbut the cached file is sent in the background job arguments, so it's\navailable regardless of whether it's persisted or not.\n\nThis commit adds support for plain models (if `Attacher.find_record`\nisn't defined), and it is used the same way as with database records.\n\n  Shrine::Attacher.promote { |data| PromoteJob.perform_async(data) }\n\n  # ...\n\n  class PromoteJob\n    def perform(data)\n      attacher = Shrine::Attacher.promote(data)\n      attacher.get # returns promoted files\n    end\n  end\n\nThe returned attacher object can then be used to get the promoted\nfiles, so that you can perform any additional tasks if you need to.","distinct":true,"url":"https://api.github.com/repos/janko-m/shrine/commits/9928a02519009fcc43958f391966f5a078cf3d33"}]}
{"actor":{"display_login":"janko-m"}}