Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Consider this:
- `= select_tag "blockstyles[#{blockstyle}]"`
- Now consider
- `blockstyle == "[Basic Text Frame]"`
- resulting in http parameter name
- `blockstyles[[Basic Text Frame]]`
- which results in Rails turning that into
- `"blockstyles"=>{"Basic Text Frame"=>""}`
- As it thinks it's 'helpfully' interpreting the extra square brackets as a double hash opening, which of course I don't want, so discards.
- Is there a way to escape the square brackets in the string so I get
- `"blockstyles"=>{"[Basic Text Frame]"=>""}`
- Oh, and if you're wondering why the square brackets have to be there, I can genuinely blame adobe for this.
Add Comment
Please, Sign In to add comment