Skip to content

Conversation

@ofir-frd
Copy link

Benchmark PR discourse#36420

Type: Corrupted (contains bugs)

Original PR Title: DEV: Add symbol to ActiveModel attribute types
Original PR Description: ActiveModel doesn’t have a symbol type by default, but it can be quite handy for contracts from our service framework.

This way, it’s easy to get a symbol from an attribute. Any non-blank value will get converted to a symbol by being converted to a string before. A blank value will return nil.


Example of a PR that will use this: discourse#36211
Original PR URL: discourse#36420

Compliance Violation

  • Rule: Tests Must Avoid Unnecessary Comments and Obvious Assertions
  • Language: Ruby
  • File: spec/lib/active_support_type_extensions/symbol_spec.rb

Flink and others added 2 commits December 3, 2025 09:58
`ActiveModel` doesn’t have a `symbol` type by default, but it can be
quite handy for contracts from our service framework.

This way, it’s easy to get a symbol from an attribute. Any non-blank
value will get converted to a symbol by being converted to a string
before. A blank value will return `nil`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants