Displaying 6 results from an estimated 6 matches for "reportcontrol".
Did you mean:
portcontrol
2006 Oct 13
2
Splitting controller
I''m trying to split controller into several files. I tried extracting
methods into separate files and then requiring them in main
controller, but this doesn''t seem to work.
controllers/reports/sales_reports.rb:
class ReportController < ApplicationController
def sales
end
end
controllers/reports/purchases_reports.rb:
class ReportController < ApplicationController
def purchases
end
end
controllers/report_controller.rb:
require ''reports/sales_reports''
require ''reports/purchases_reports...
2005 Nov 24
1
Log question
...COLUMNS. Wouldn''t it be more efficient to cache this info?
I''m also wondering about strings like "[4;35;1m". What''s their purpose
and is it possible to get rid of them? They look like screen coordinates
and makes no sense in a text file.
Christer
Processing ReportController#create (for 127.0.0.1 at 2005-11-24
08:18:41) [POST]
Parameters: {"action"=>"create", "controller"=>"report",
"report"=>{"flightnumber"=>"XYZ789", "id"=>"", "description"=>&q...
2006 Jun 07
1
Setter that converts a float attribute to integer
...Ok, let''s check the
database:
mysql> select id, price from reports;
+----+-------+
| id | price |
+----+-------+
| 20 | 245 |
+----+-------+
1 row in set (0.00 sec)
It seems that all is ok. Well, let''s prepare a controller with a
couple of actions, insert and edit:
class ReportController < ApplicationController
def insert
@report = Report.new(params[:report])
if @request.post? and @report.save
redirect_to :action => ''list''
end
end
def edit
@report = Re...
2006 Jun 07
2
Problem with a setter that converts euros to cents
...Ok, let''s check the database:
mysql> select id, price from reports;
+----+-------+
| id | price |
+----+-------+
| 20 | 245 |
+----+-------+
1 row in set (0.00 sec)
It seems that all is ok. Well, let''s prepare a controller with a
couple of actions, insert and edit:
class ReportController < ApplicationController
def insert
@report = Report.new(params[:report])
if @request.post? and @report.save
redirect_to :action => ''list''
end
end
def edit
@report = Report.find(params[:id])
@report.attributes = params[:report]
if @request.post? and @rep...
2011 Feb 03
0
Correct way to exclude attributes from json serialization
Hi
I''m using Mongoid and Rails 3, and I want to serialize one of my
mongoid documents to json for publishing via a controller, e.g.
class ReportController < ApplicationController
respond_to :json
def show
report = Report.where(:report_id => params[:id]).first
respond_with report
end
end
This works ok, but pushes out every attribute on the document
including the "internal" mongodb document id, e.g. :
{...
2007 Mar 07
10
MiddleMan.worker blocks?
Hello -
I am observing that calls to MiddleMan.worker return only after the worker
has completed its work. This puzzles me, and I presume that I am doing
something wrong. Can anyone make suggestions?
Snippets from my code are:
class ReportController < SecurityController
...
def create_xml_report(report,start_time)
constraints = get_constraints(report,start_time,false)
args = { :constraints => constraints,
:start_time => start_time,
:report_params => report
}...