ruby on rails

I have has_and_belongs_to_many relation in my models. I have relation beetween models Hotels and HotelRoomsTypes

class Hotel < ActiveRecord::Base
    attr_accessible hotel_room_types_attributes    
    has_and_belongs_to_many :hotel_room_types,:class_name => "HotelRoomType"
    accepts_nested_attributes_for :hotel_room_types, :allow_destroy => true
end

class HotelRoomType < ActiveRecord::Base
  attr_accessible :name
  has_and_belongs_to_many :hotels
end

when I am trying create association in rails_admin, I see following markup: 在这里输入图像描述

after creation, rails_admin doesn't show associations to those model. Anybody solved those problem or found patch to rails_admin?


I had downgraded from rails_admin 0.4.9 to 0.4.1 and problem solves.

You can track progress of solution here: https://github.com/sferik/rails_admin/issues/1737

链接地址: http://www.djcxy.com/p/67054.html

上一篇: 红宝石在轨道上

下一篇: 红宝石在轨道上