{"push_id":1403966403,"size":1,"distinct_size":1,"ref":"refs/heads/feature/pass-block-to-methods","head":"25cb79bb50fd8112dcdcedc1dd5d84c3f7670f46","before":"5d0beadcdbf9c100d6e0afc436189daf95277bbe","commits":[{"sha":"25cb79bb50fd8112dcdcedc1dd5d84c3f7670f46","author":{"name":"Rinat Shaykhutdinov","email":"3b8e10480754ba93523db5dc4626a5f001e54bb7@rubydeveloper.ru"},"message":"Add ability to pass blocks while calling to `super`\n\nWith that functionality you can extend default controller methods\nbehaviour by passing block to `super` method call like that:\n\n```ruby\nclass SomeController < ApplicationController\n  def index\n    super do\n      # set_collection is special Crudie method that updates current\n      #   collection variable with new value.\n      set_collection(collection.where(some: 'filter'))\n    end\n  end\n\n  def create\n    super do\n      # Here you can do any additional processing with resource object\n      resource.update_attributes(some: 'value')\n    end\n  end\n\n  def destroy\n    # You can perform actions before destroying object\n    resource.make_some_cleanup\n\n    super do\n      # This code will be executed after object destroing\n      SomeJob.perform\n    end\n  end\nend\n```","distinct":true,"url":"https://api.github.com/repos/ri-nat/crudie/commits/25cb79bb50fd8112dcdcedc1dd5d84c3f7670f46"}]}
{"actor":{"display_login":"ri-nat"}}