Skip to content

CXCX-96: Readymade add generators#8

Draft
dmrAnderson wants to merge 1 commit intoOrestF:masterfrom
dmrAnderson:CXCX-96-readymade-add-generators
Draft

CXCX-96: Readymade add generators#8
dmrAnderson wants to merge 1 commit intoOrestF:masterfrom
dmrAnderson:CXCX-96-readymade-add-generators

Conversation

@dmrAnderson
Copy link
Copy Markdown

No description provided.

Comment thread lib/readymade/action.rb
def self.call(*args, &block)
new(*args, &block).call
def self.call(...)
new(...).call
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are u sure it works with different ruby versions?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works fine with 2.7 and 3.1

Comment thread lib/readymade/form.rb
errors.merge!(to.errors.instance_variable_get(messages).to_h)

to.errors.instance_variable_set('@messages', errors)
to.errors.instance_variable_set(messages, errors)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did u make this changes?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robocop

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert it

Comment thread lib/readymade/form.rb
to.errors.messages.transform_values!(&:uniq) # Does not work with rails 6.1
end
rescue FrozenError => _e
# TODO
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, robocop suggestion

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.

2 participants