NAMESPACE=bcms_my401k ./bin/rails g cms:content_block BcmsMy401k::Widget user_id:integer name:string description:text
For some reason, when generating content blocks, integers are mapped to ‘cms_number_field’ form helpers, but they don’t seem to exist.
To resolve this issue, we simply need to provide the missing components that BrowserCms is complaining about.
- include 'number_field' in the list of form helper methods generated at load time
- associate a partial with the new form helper

Although this solution (creating a partial) is currently identical to ‘cms_text_field’, the partial could be updated later to validate a numeric entry.
No comments:
Post a Comment