Displaying 4 results from an estimated 4 matches for "do_report".
2006 Mar 19
1
Question on creating a report
...39;'t seem quite "Rails".
I created two methods in a controller, one called "report" that was empty:
def report
end
that would just then display the report.rhtml page. This page
contained a form tag with a text box and a submit button. This form
then submitted to a "do_report" method in the controller:
def do_report
teams = ..... etc
end
This then displayed a do_report.rhtml which formatted the output.
I thought I would try to streamline it a bit, and moved the code in
do_report into the report method, and had the and had the form submit
directly to the "...
2007 Feb 23
4
How can I spec this? The method gets passed a block...
...eo do
xml.id @video_id
xml.views @views
xml.date(@date.to_s) if @date
end
I''d like to mock it, rather than asserting that the XML is the right
string. I can do one spec:
specify "should create a video tag" do
@mock_builder.should_receive(:video)
do_report
end
but I can''t do anything else. Setting an expectation for :id, :views,
and :date all fail. It''s obvious to me why it does...the stubbed
:video method doesn''t know to execute the stuff in the block. So
what''s the best way to spec this?
Pat
2008 May 09
1
register_status for excess thread_pool?
...rocess_pdf(user)
thread_pool.defer(user) do |user|
makepdf(user)
end
end
My question is: I use a mutex to handle synchronizing the
register_status. This works fine:
def makepdf(user)
txt = user.to_s + " started"
save_status(user, :progress, txt)
do_report(user)
txt = user.to_s + " ended"
save_status(user, :progress, txt)
end
def save_status(user_id,key,data)
@status_mutex.synchronize do
@worker_status[user_id] = { :key => key, :data => data}
end
register_status(@worker_status)
end
However,...
2003 May 16
4
[RFC] report options
I have hinted in the past of wanting to go to a more
selective control of the output of rsync. Here it is.
PROBLEMS with the existing --verbose et al.
The simple incrementing verbose doesn't allow one to
restrict stdout to what actually is of interest. For
instance inside dirvish i don't care about directories,
or any kind of non-regular file because they show up every
time even if