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
nice to see hashid turning into its own rails gem. But what about form_for and form_with helpers in Rails? If i want to obscure ID's within URL's it works fine. Using form_for would generate its CLASS and ID automatically by using to_key and reveal the original ID within the DOM. What do you think, is that something that should be addressed?
The text was updated successfully, but these errors were encountered:
Hi @skorth. Thanks for bringing this up! I was able to recreate using the view helper dom_id(@model, :action). Hadn't considered that scenario before.
Looks like overriding to_key instead of to_param would sort things out, but need to review typical usage. It makes sense conceptually that the model's key would be the hashid, not the database id.
Hey there,
nice to see hashid turning into its own rails gem. But what about
form_for
andform_with
helpers in Rails? If i want to obscure ID's within URL's it works fine. Usingform_for
would generate its CLASS and ID automatically by usingto_key
and reveal the original ID within the DOM. What do you think, is that something that should be addressed?The text was updated successfully, but these errors were encountered: