class FlexColumns::Errors::ConflictingJsonStorageNameError

Raised when you try to define a field with the same JSON storage name, but a different field name, as a previously-defined field.

Attributes

column_name[R]
existing_field_name[R]
json_storage_name[R]
model_class[R]
new_field_name[R]

Public Class Methods

new(model_class, column_name, new_field_name, existing_field_name, json_storage_name) click to toggle source
Calls superclass method
# File lib/flex_columns/errors.rb, line 37
      def initialize(model_class, column_name, new_field_name, existing_field_name, json_storage_name)
        @model_class = model_class
        @column_name = column_name
        @new_field_name = new_field_name
        @existing_field_name = existing_field_name
        @json_storage_name = json_storage_name

        super(%{On class #{model_class.name}, flex column #{column_name.inspect}, you're trying to define a field,
#{new_field_name.inspect}, that has a JSON storage name of #{json_storage_name.inspect},
but there's already another field, #{existing_field_name.inspect}, that uses that same JSON storage name.

These fields would conflict in the JSON store, and thus this is not allowed.})
      end