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

Add support for model-level config #67

Merged
merged 2 commits into from
Oct 30, 2019
Merged

Add support for model-level config #67

merged 2 commits into from
Oct 30, 2019

Conversation

jcypret
Copy link
Owner

@jcypret jcypret commented Oct 30, 2019

This adds a hashid_config class method to allowing for overriding the default hashid config. The supports all the existing configuration options. It was added particularly to address the issue of changing a table name without changing the hashids.

Example usage:

class MyModel < ApplicationRecord
  include Hashid::Rails
  hashid_config pepper: "old_table"
end

This adds a `hashid_config` class method to allowing for overriding the
default hashid config. The supports all the existing configuration
options. It was added particularly to address the issue of changing a
table name without changing the hashids.

Example usage:

  class MyModel < ApplicationRecord
    include Hashid::Rails
    hashid_config pepper: "old_table"
  end
@jcypret
Copy link
Owner Author

jcypret commented Oct 30, 2019

Implements #60

@jcypret jcypret merged commit 98df76e into master Oct 30, 2019
@jcypret jcypret deleted the model-level-config branch October 30, 2019 03:59
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.

None yet

1 participant