Hey! I’d like to ask you how to create a model template, similar to helper template. I haven’t found anything related to model templating here, but I’ll be very appreciative for any help.
PS: I’ve tried to create something like this
<% module_namespacing do -%>
class <%= class_name %> < ApplicationRecord
### extends-----------------------------------------------------------------------------------------------------------
### includes----------------------------------------------------------------------------------------------------------
### constants---------------------------------------------------------------------------------------------------------
### class methods-----------------------------------------------------------------------------------------------------
### relationships-----------------------------------------------------------------------------------------------------
### validations-------------------------------------------------------------------------------------------------------
### callbacks (caution: triggers side effects)------------------------------------------------------------------------
### scopes (composable db queries)------------------------------------------------------------------------------------
### additional config (accepts_nested_attribute_for, etc.)------------------------------------------------------------
### public instance methods-------------------------------------------------------------------------------------------
### protected instance methods----------------------------------------------------------------------------------------
### private instance methods------------------------------------------------------------------------------------------
end
<% end -%>
here lib/templates/rails/model/model.rb.tt
, but - no success
PPS: earlier I wrote an article about custom templates for rails apps, so you’ll help me to improve this guide