2013-10-21 2 views
1

내가 #AdminUser에 대한 '관리 :: PropertyDetailsController # 지수 정의되지 않은 메서드`property_types에 관계 belongs_to활동 관리 : 레일에서 "정의되지 않은 방법"오류를주는 belongs_to 4

NoMethodError를 사용할 때 다음과 같은 오류가 점점 오전 : 0x00000005e59a70

문제를 해결하는 데 도움을주십시오. 내가 루비 2.0.0p247와 ActiveAdmin을 0.60을 사용하고 레일하고

4.

Gemfile : 보석 'ActiveAdmin을', GitHub의 'gregbell/active_admin'지점 'rails4'

ActiveAdmin.register PropertyDetail do 

belongs_to :property_type 

menu :label => "Latest Properties in the Town" 

controller do 
    def permitted_params 
     params.permit(:property_detail => [:title ,:description, :image_url, :price, :land_area, :land_unit, :contact_id, :property_type_id, :purpose_id]) 
    end 

end 

index do 
    column :title 
    column :description 
    column :image_url 
    column :price, :sortable => :price do |property_detail| 
    div :class => "price" do 
     number_to_currency property_detail.price 
    end 
end 
end 
form :partial => "form" 

end 

ActiveAdmin.register PropertyType do 

end 

답변

관련 문제