You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fix for the user is to splat their options in the initializer like so: config.add_tokenable_options :confirm, **TokenMaster::Config::DEFAULT_VALUES
creating an issue in here in case there's an option to update the core code to support either approaches, for example not double-splatting and setting the default to be the TokenMaster default
The text was updated successfully, but these errors were encountered:
inveterateliterate
changed the title
Rails 3 handles hashs vs keyword args differently, users may run into an error with the comments in the config
Ruby >=3 handles positional args vs keyword args differently, users may run into an error with the comments in the config
Aug 11, 2022
Initializer Template includes guidance liek the below:
However, because of the way the second argument (a hash) is deconstructed in lib/config:
This results in a conflict with the way Ruby 3.1 is passing those options along:
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
The fix for the user is to splat their options in the initializer like so:
config.add_tokenable_options :confirm, **TokenMaster::Config::DEFAULT_VALUES
creating an issue in here in case there's an option to update the core code to support either approaches, for example not double-splatting and setting the default to be the TokenMaster default
The text was updated successfully, but these errors were encountered: