Ash always casts attributes, even if they are rejected by the action?

I’m trying to prevent an attribute from being cast, so I can manipulate it myself, but I can’t figure out how to do it. I tried to set the reject the field in my action, but it’s cast regardless. Any idea how to do it or if it is a possible bug?

    # Action
    create :create do
      primary? true
      reject [:symbol] # :symbol is still cast
    end
  
  # function used to create the record
  code_interface do
    define :create_push_notification, action: :create
  end

# Function call
data = %{symbol: _, ...}
Dashboard.create_push_notification(data, actor: :admin)

Hmm…yeah, you’re right. We can’t always avoid casting because we don’t always know the action ahead of time, but we can probably in most cases. However, If you want to do custom input casting, the best way is generally to define a custom type. Alternatively, you can look in changeset.params for the original input value.