conversionfoundry / breeze

A Ruby on Rails CMS for brochure-style websites.
Other
3 stars 2 forks source link

Parsing of custom type names with _ and numbers is broken #28

Closed ShaneNZ closed 11 years ago

ShaneNZ commented 11 years ago

Observed on Leftclick site (Breeze version?)

If a CT is created with underscores followed by digits in the name, then Breeze incorrectly strips the underscores out with it generates the default partial name.

Examples: Create a CT called customtype_one -> Breeze looks for a partial called _customtype_one (correct) Create a CT called customtype_1 -> Breeze looks for partial called _customtype1 (incorrect)

albandiguer commented 11 years ago

Comment on this Shane, basically the behavior for the moment is to get the dynamic class name to retrieve what is the partial name. Changing this is more tricky that is seems to be. However from our conversations I added validation and test concerning the pattern of the name. Avoiding creating classes named

SuperCustomType(20%)!

We can now enter only letters, digits space, dash and underscores.

Thanks, Al