@@ -33,7 +33,8 class RolesController < ApplicationController | |||||
33 | end |
|
33 | end | |
34 |
|
34 | |||
35 | def new |
|
35 | def new | |
36 | @role = Role.new(params[:role]) |
|
36 | # Prefills the form with 'Non member' role permissions | |
|
37 | @role = Role.new(params[:role] || {:permissions => Role.non_member.permissions}) | |||
37 | if request.post? && @role.save |
|
38 | if request.post? && @role.save | |
38 | flash[:notice] = l(:notice_successful_create) |
|
39 | flash[:notice] = l(:notice_successful_create) | |
39 | redirect_to :action => 'list' |
|
40 | redirect_to :action => 'list' |
General Comments 0
You need to be logged in to leave comments.
Login now