RailsViewGenerator
This gem adds a Rails generator that creates just the view file which would normally generated by a rails generate scaffold
command.
Installation & Usage
bundle add rails_view_generator, group: :development
bundle install
rails generate view ModelName field_name:field_type field_name2:field_type2 ...
This generator utilizes the same look-up for the .html.erb.tt
files as the original scaffold generator, which can be found in the rails/generators/erb/scaffold/templates
.
You can customize these views by copying them to lib/templates/erb/scaffold
and modifying them as needed.
Relevant Links:
Changelog
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/coezbek/rails_view_generator.