Skip to content

Nested attributes don't get permitted properly if the association is not the name of the class #3

Description

@jonaizen

Doing this:

class TaskType < ActiveRecord::Base
  TaskType  has_one :providers_description_cta, class_name: 'Cta', as: :actionable
end

And:

config.task_type do
  nested :providers_description_cta
end

config.cta do
  scalar :type, :text, :url, :phone
end

Doesn't work because it doesn't realize that :providers_description_cta is a :cta. I should be able to specify what class to use by saying as: :cta

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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