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
@hotels = Hotel.find (:all, :include=> :kamars ,
:conditions => [“kamars.id_tipe_kamar = ?”,
I want to show all data in kamars that corresponding with @hotels and
the condition. Please Help me.