diff --git a/app/models/refinery/dynamicfields/dynamicform_value.rb b/app/models/refinery/dynamicfields/dynamicform_value.rb index c436372..5912577 100644 --- a/app/models/refinery/dynamicfields/dynamicform_value.rb +++ b/app/models/refinery/dynamicfields/dynamicform_value.rb @@ -9,8 +9,8 @@ class DynamicformValue < Refinery::Core::BaseModel belongs_to :resource, :class_name => '::Refinery::Resource' def self.find_by_page_and_field_id(page_id, field_id) - self.joins(:dynamicform_association, :dynamicform_field).where("dynamicform_associations.page_id" => page_id, "dynamicform_fields.field_id" => field_id).first + self.joins(:dynamicform_association, :dynamicform_field).where("#{::Refinery::Dynamicfields::DynamicformAssociation.table_name}.page_id" => page_id, "#{::Refinery::Dynamicfields::DynamicformField.table_name}.field_id" => field_id).first end end end -end \ No newline at end of file +end