# ActiveRecord::RecordNotFound

**URL:** <https://www.ruby-forum.com/t/activerecord-recordnotfound/154324>\
**Category:** Rails\
**Created:** [November 27, 2008, 6:02pm UTC](https://www.ruby-forum.com/t/activerecord-recordnotfound/154324 "2008-11-27T18:02:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@amarime](https://www.ruby-forum.com/u/amarime)\
**Post date:** [November 27, 2008, 6:02pm UTC](https://www.ruby-forum.com/t/activerecord-recordnotfound/154324/1 "2008-11-27T18:02:41Z")

</div>

Hi group!  
i’m new to ruby and trying to include the FusionCharts in my project  
error Couldn’t find FactoryMaster without an ID  
here’s my code:  
def detailed  
headers[“content-type”]=“text/html”;  
@factory\_id = params[:FactoryId]  
@factory\_data = []

```
  factory_master = FactoryMaster. find(@factory_id)
  factory_master.factory_output_quantities.each do |

```

factory\_output|  
date\_of\_production = factory\_output.date\_pro  
quantity\_number = factory\_output.quantity  
@factory\_data\<\<  
{:date\_of\_production=\>formatted\_date,:quantity\_number=\>quantity\_number}  
end  
end

view:  
\<% @page\_title=" FusionCharts - Database and Drill-Down Example " %\>  
\<% @page\_heading=" FusionCharts Database and Drill-Down Example " %\>  
\<% @page\_subheading=“Detailed report for the factory” %\>  
\<%str\_xml = render “process\_utilizations/factory\_details”,  
{:factory\_data=\>@factory\_data,:factory\_id=\>@factory\_id}  
render\_chart ‘/FusionCharts/Column2D.swf’, ‘’, str\_xml,  
‘FactoryDetailed’, 600, 300, false, false do -%\>  
\<% end-%\>

  
Back to Summary  

XML builder:  
xml = ::Builder::XmlMarkup.new  
xml.chart(:palette=\>‘2’, :caption=\>‘Factory’ + factory\_id.to\_s + ’  
Output ‘, :subcaption=\>’(In  
Units)’, :xAxisName=\>‘Date’, :showValues=\>‘1’, :labelStep=\>‘2’) do  
for item in factory\_data  
xml.set(:label=\>item[:date\_of\_production],:value=\>item  
[:quantity\_number])  
end  
end

thanks

---

<div class="post-metadata">

**Author:** ![amarime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@amarime](https://www.ruby-forum.com/u/amarime)\
**Post date:** [November 27, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/activerecord-recordnotfound/154324/2 "2008-11-27T18:24:26Z")

</div>

On Nov 27, 5:01 pm, amarime [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi group!  
> i’m new to ruby and trying to include the FusionCharts in my project  
> error Couldn’t find FactoryMaster without an ID  
> here’s my code:  
> def detailed  
> headers[“content-type”]=“text/html”;  
> @factory\_id = params[:FactoryId]  
> For whatever reason, this is nil.

Fred
