# RoR Developer Needed

**URL:** <https://www.ruby-forum.com/t/ror-developer-needed/63129>\
**Category:** Rails\
**Created:** [June 12, 2006, 3:13pm UTC](https://www.ruby-forum.com/t/ror-developer-needed/63129 "2006-06-12T15:13:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Larry\_Staton\_Jr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Larry\_Staton\_Jr](https://www.ruby-forum.com/u/Larry_Staton_Jr)\
**Post date:** [June 12, 2006, 3:13pm UTC](https://www.ruby-forum.com/t/ror-developer-needed/63129/1 "2006-06-12T15:13:44Z")

</div>

Our law firm is looking for a contractor to assist in developing and  
extending our internal case management system. This system tracks  
most aspects of our workflow. Our current system is deployed as a  
WebObjects application and would need to be rewritten in Ruby on  
Rails. We need a dedicated person(s) to help us rewrite the system  
and drive future development.

Applicants must have at least 2 years of prior web application  
development experience with demonstratable Ruby on Rails skills.  
Applicants must also have experience with relational database  
systems, preferably OpenBase. The current Web application uses  
OpenBase, but we are willing to switch to PostgreSQL. A strong  
commitment to Web standards and quality, test-driven code is a huge  
plus as is the ability to design intuitive applications.

Our case management system is deployed on a Apple XServe running Mac  
OS X Server.

We are looking to hire immediately. If you are interested in  
applying, feel free to send an e-mail to removed\_email\_address@domain.invalid.

---

<div class="post-metadata">

**Author:** ![Larry\_Staton\_Jr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Larry\_Staton\_Jr](https://www.ruby-forum.com/u/Larry_Staton_Jr)\
**Post date:** [June 12, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/ror-developer-needed/63129/2 "2006-06-12T23:04:43Z")

</div>

Hey, i’m trying to iterate over the grouped results of a :group  
statement,

for example, like a city, has\_many :buildings, :group =\> “neighbourhood”

or @city.buildings.find(:group =\> “neighbourhood\_id”)

or even if i were to grab it straight from sql,

how do i iterate over the result ?

i thought maybe it would be key value, key being the neighbourhood id  
and value being the collection, however that didnt seem to work for me.

what i would like accomplish is being able to display the of buildings  
for each neighbourhood.

any ideas ?

thanks,

d.

---

<div class="post-metadata">

**Author:** ![Larry\_Staton\_Jr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Larry\_Staton\_Jr](https://www.ruby-forum.com/u/Larry_Staton_Jr)\
**Post date:** [July 19, 2006, 5:21am UTC](https://www.ruby-forum.com/t/ror-developer-needed/63129/3 "2006-07-19T05:21:10Z")

</div>

Hi David,

Collections should work in a has\_many relationship. In my example below,  
the  
Customer model has\_many :addresses  
Addresses are of the Array class

class Customer \< ActiveRecord::Base  
has\_many :addresses  
end

Customer and Address tables might look something like:

create\_table “customers” do |t|  
t.column “number”, :string, :limit =\> 50  
t.column “name”, :string, :default =\> “”, :null =\> false  
end

create\_table “addresses” do |t|  
t.column “customer\_id”, :integer, :default =\> 0, :null =\> false  
t.column “street”, :string, :default =\> “”, :null =\> false  
t.column “city”, :string, :default =\> “”, :null =\> false  
end

Some data:

insert into customers values  
(1, ‘10001’, ‘AAA Cooper’),  
(2, ‘10002’, ‘Absolute’);

insert into addresses values  
(1, 1, ‘1751 Kinsey Road’, ‘Vancouver’),  
(2, 1, ‘101-11312-98 Avenue’, ‘Grande Prairie’),  
(3, 2, ‘800 Cabin Hill Dr’, ‘Greensburg’),

Console testing:

> ruby script\console

> > c=Customer.find(1)  
> > =\> #\<Customer:0x39251f0 @attributes={“name”=\>“AAA Cooper”,  
> > “number”=\>“10001”, “id”=\>“1”, “address\_id”=\>“1”}\>

> > c.addresses.size  
> > 2

> > c.addresses[0].city  
> > Vancouver

> > c.addresses.each {|x| p x.city}  
> > Vancouver  
> > Grand Prairie

I use collect in my rhtml templates like so:

\<% for customer in @customers %\>

 \<%=h customer.name %\> &nbsp; &nbsp; \<%= link\_to 'Show', :action =\> 'show', :id =\> customer %\> \<%= link\_to 'Delete', { :action =\> 'destroy', :id =\> customer }, :confirm =\> 'Are you sure?', :post =\> true %\> \<% for addr in customer.addresses.collect %\> &nbsp; \<%=h addr.street %\> \<%=h addr.city %\> \<% end end %\>

Hope this helps!  
Dave

---

<div class="post-metadata">

**Author:** ![Larry\_Staton\_Jr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Larry\_Staton\_Jr](https://www.ruby-forum.com/u/Larry_Staton_Jr)\
**Post date:** [December 18, 2008, 2:59pm UTC](https://www.ruby-forum.com/t/ror-developer-needed/63129/4 "2008-12-18T14:59:21Z")

</div>

Ok, found it:

[http://wiki.radiantcms.org/Conditional\_tags](http://wiki.radiantcms.org/Conditional_tags)

The header tag is what I needed.

Cheers,  
Nicholas

On Wed, Dec 17, 2008 at 2:14 PM, Nicholas H.
