{"issue":{"title":"Delayed::Job: How to enqueue export","user":{"login":"tomkurt","id":56425,"url":"https://api.github.com/users/tomkurt","avatar_url":"https://secure.gravatar.com/avatar/a2f121910687409990b927cc4486246f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a2f121910687409990b927cc4486246f"},"created_at":"2011-12-29T17:13:57Z","milestone":null,"labels":[],"state":"open","updated_at":"2011-12-29T17:13:57Z","id":2680942,"closed_at":null,"html_url":"https://github.com/leikind/wice_grid/issues/63","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"Is it possible to extract ar_options from wice grid without triggering the \"all\"-query?\r\n\r\nThen I could do something like\r\n```ruby\r\n\r\nclass ProductsController\r\n  class ExportJob < Struct.new(:ar_option)\r\n    def perform\r\n      ProductMailer.send_products(Product.find(ar_options).to_csv)\r\n    end\r\n  end\r\n\r\n  def index\r\n     @grid initialize_grid(Product)\r\n     if @grid.output_csv?\r\n        @grid.render_partial_without_fetching_records\r\n        Delayed::Job.enqueue(ExportJob.new(@grid.ar_options))\r\n  end\r\nend\r\n```","number":63,"url":"https://api.github.com/repos/leikind/wice_grid/issues/63","comments":0,"assignee":null},"action":"opened"}