lib/templates/rails/scaffold_controller/controller.rb in petergate-0.2.1 vs lib/templates/rails/scaffold_controller/controller.rb in petergate-0.2.2
- old
+ new
@@ -3,10 +3,10 @@
<% end -%>
<% module_namespacing do -%>
class <%= controller_class_name %>Controller < ApplicationController
before_action :set_<%= singular_table_name %>, only: [:show, :edit, :update, :destroy]
- access user: [:index]
+ access [:user, :all] => [:index, :show, :new, :edit, :create, :update, :destroy]
# GET <%= route_url %>
def index
@<%= plural_table_name %> = <%= orm_class.all(class_name) %>
end