app/controllers/alchemy/custom/model/admin/base_controller.rb in alchemy-custom-model-0.1.5 vs app/controllers/alchemy/custom/model/admin/base_controller.rb in alchemy-custom-model-0.1.6
- old
+ new
@@ -59,10 +59,10 @@
end
class << self
- mattr_accessor :parent_model_name, :parent_klass, :parent_find_method
+ class_attribute :parent_model_name, :parent_klass, :parent_find_method
def belongs_to(model_name, options = {})
prepend_before_action :load_parent
const_model_klass = options[:model_klass].to_s.constantize unless options[:model_klass].nil?
self.parent_model_name = model_name.to_s