administrate icon indicating copy to clipboard operation
administrate copied to clipboard

Documentation says Field::URL accepts option for truncate but code is different

Open thebravoman opened this issue 1 year ago • 3 comments

Documentation at https://administrate-demo.herokuapp.com/customizing_dashboards Code was not calling truncate. With current change truncate is called.

This is a clean PR along with a spec. Original PR is at https://github.com/thoughtbot/administrate/pull/2544 but it was mostly to get some feedback.

thebravoman avatar May 25 '24 08:05 thebravoman

Thank you for this, and apologies for the delay to look at it. One problem is that the spec doesn't test the functionality as it's all stubbed. I understand it still needed updating to avoid it breaking.

Field::String and Field::Text are also affected. Would you be up for fixing those and see if you can provide specs that do test for regressions?

pablobm avatar Jul 19 '24 10:07 pablobm

I was thinking about this and tried staying with the current way tests are written and have a minimal change. Calling the method with less stubbing would mean moving a little further than what is currently in the specs. It will require probably a new type of spec. I could think about it.

thebravoman avatar Jul 22 '24 05:07 thebravoman

@thebravoman - If you could give it a go, that would be great :slightly_smiling_face: If after some trying, you find it's too complex or otherwise have difficulty, let us know here and we can rethink it.

pablobm avatar Jul 26 '24 14:07 pablobm