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

Trailblazer::Rails::Form breaks Reform::Form.human_attribute_name #47

Open
zavan opened this issue Jun 22, 2017 · 0 comments
Open

Trailblazer::Rails::Form breaks Reform::Form.human_attribute_name #47

zavan opened this issue Jun 22, 2017 · 0 comments

Comments

@zavan
Copy link

zavan commented Jun 22, 2017

Since Trailblazer::Rails::Form is a SimpleDelegator, it does not delegates class method calls to the wrapped class, thus breaking Reform::Form.human_attribute_name and probably other delegated class methods.

human_attribute_name is used by simple_form here.

A temporary fix may be reopening Trailblazer::Reform::Rails in an initializer and extending it with ActiveModel::Translation, but it's a hack and a very fragile one:

class Trailblazer::Rails::Form < SimpleDelegator
  extend ::ActiveModel::Translation
end

Related #44

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

1 participant