Set group name from path in admin controller
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
ed2bcf952b
commit
52a8e5c01a
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ class Admin::GroupsController < Admin::ApplicationController
|
|||
|
||||
def create
|
||||
@group = Group.new(group_params)
|
||||
@group.path = @group.name.dup.parameterize if @group.name
|
||||
@group.name = @group.path.dup unless @group.name
|
||||
|
||||
if @group.save
|
||||
@group.add_owner(current_user)
|
||||
|
|
Loading…
Reference in a new issue