Dear All.
Sorry I am noob here, I want to ask how to show data in included class.
this is my detail :
----------------------------------------------------
class Kamar < ActiveRecord::Base
  belongs_to :hotel,  :foreign_key => ''id_hotel''
----------------------------------------------------
class Hotel < ActiveRecord::Base
  has_many :kamars, :foreign_key => ''id_hotel''
----------------------------------------------------
class HotelController < ApplicationController
...
  def list
  @hotels = Hotel.find (:all, :include=>  :kamars ,
                        :conditions => ["kamars.id_tipe_kamar = ?",
''6''])
...
----------------------------------------------------
I want to show all data in kamars that corresponding with @hotels and
the condition. Please Help me.
Thanks.
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---