abartov / bybeconv

Project Ben-Yehuda's content management system.
https://benyehuda.org/
Other
10 stars 5 forks source link

Corporate body crud #315

Closed damisul closed 3 months ago

damisul commented 3 months ago

Updated scaffold-generated controller to do CRUD for CorporateBody. It is located under http://localhost:3000/corporate_bodies

This PR introduce Simple_Form gem into a project, which is configured to use Bootstrap 4 (in future we can configure it to use different framework, or even some custom styles).

Please take a looks on shorter syntax of form code, and how we can manipulate with hints/placeholders/labels using i18n strings.

I've added i18n config for ActiveRecord and started filling it with data for CorporateBody. It will allow to use translated field names in all standard error messages. Note, that Simple_form renders all validation errors below fields, and now they will be translated, e.g.: изображение

Also in simple_form_he.yml you can override some titles for specific form, add hints, placeholder text, etc. (I've added few for demonstraiton, you can remove them).