Skip to content

NoMethodError: undefined method 'absolute_path' for an instance of String #54

@denzelem

Description

@denzelem

I recently had a assignable value with the column name order_type_gas.

  1. ActiveSupport::Inflector didn't know how to inflect it 'order_type_gas'.pluralize => "order_type_gas"
  2. I ran into a deprecation warning of assignable_values' active_record/restriction/scalar_attribute.rb#L91
  3. The deprecation warning raises an error in Rails 8.1 / Ruby 3.4
Exception: NoMethodError: undefined method 'absolute_path' for an instance of String

I would suggest to:

  • raise an error in assignable_values if restriction.property.to_s == restriction.property.to_s.pluralize
  • fix the ActiveSupport::Deprecation.new.warn argument to work with >= Rails 7.1 or remove the method completely

I you don't want to fix the issue feel free to close the issue. It is not important for me to be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions