Displaying 2 results from an estimated 2 matches for "10_000_000".
Did you mean:
1_000_000
2012 Mar 29
2
Rails 3.2 and Streaming using response_body
I am working on a streaming download (CSV) from Rails 3.2 and am coming up
against an issue of the initial page request taking a long time. The
following controller code illustrates my issue:
self.response_body = Enumerator.new do |y|
10_000_000.times do
y << "Hello World"
end
end
With the above, the response does seem like its streaming (from a server
than can support it... Unicorn, in my case). That said, before it starts
streaming it hangs for a much longer time than I''d like. If I ch...
2007 May 01
2
Problem validating boolean
...i
I''ve got a problem validating a boolean and I can''t see what the
problem is. Here''s my model:
class FinanceAgreement < ActiveRecord::Base
belongs_to :asset
validates_presence_of :finance_company
validates_inclusion_of :balance, :in => 0.01..10_000_000
validates_inclusion_of :term, :in => 1..600
validates_numericality_of :term, :only_integer => true
validates_inclusion_of :linked_to_residual_value_of_asset, :in
=> [true, false]
end
and here''s the RSpec code I''m using to test it:
context "A...