Sha256: e52ad6216a79a7bf193e6bd117b4718e4b88a1e5c7863ab5a2a4030f339ba354
Contents?: true
Size: 507 Bytes
Versions: 2
Compression:
Stored size: 507 Bytes
Contents
module Api module V1 class <%= class_name.pluralize %>Controller < ApiController <% for action in actions %> def <%= action %> validate_params!(<%= class_name.pluralize %><%= action.classify %>Schema::Schema) UseCases::<%= class_name.pluralize %>::<%= action.classify %>.new(<%= plural_name %>_<%= action %>_params).call render_ok end <% end %> private def <%= plural_name %>_<%= action %>_params params.permit(:id) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails-api-controller-generator-0.1.1 | lib/generators/api_controller/templates/controller.rb |
rails-api-controller-generator-0.1.0 | lib/generators/api_controller/templates/controller.rb |