Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rails 5] It requires actable when belongs_to_required_by_default is true #81

Open
wbotelhos opened this issue Sep 23, 2016 · 1 comment

Comments

@wbotelhos
Copy link

When option: config.active_record.belongs_to_required_by_default is true, it ask about actable:

ActiveRecord::RecordInvalid: Erro de validação: Actable translation missing: pt-BR.activerecord.errors.models.event.attributes.actable.required!

I imagine that the actable_id is filled after save the child, but in some way, it is validated before.

config.active_record.belongs_to_required_by_default = true
class Event < ApplicationRecord
  actable
end
class Exam < ApplicationRecord
  acts_as :event
end
Exam.create!
@wbotelhos wbotelhos changed the title [Rails 5] # config.active_record.belongs_to_required_by_default = true [Rails 5] It requires actable when belongs_to_required_by_default is true Sep 23, 2016
@manuelmeurer
Copy link
Collaborator

Is this still the case with the latest version of this gem?

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

No branches or pull requests

2 participants