app/controllers/groups_controller.rb
def create
    authorize! :create, Group
    @group = Group.new(params[:group])
    if @group.save
      flash[:notice] = t(:group) + t(:created)
    else
      flash[:error] = t(:group) + t(:needs_a_name)
    end
    redirect_to groups_path
  end
# Creates a new group using the information entered on the "new" page
Creates a new group using the information entered on the "new" page
Creates a new group using the information entered on the " new " page
def create
    authorize! :create, Group
    @group = Group.new(params[:group])
    if @group.save
      flash[:notice] = t(:group) + t(:created)
    else
      flash[:error] = t(:group) + t(:needs_a_name)
    end
    redirect_to groups_path
  end
def create authorize! :create , Group @group = Group . new ( params [ :group ] ) if @group . save flash [ :notice ] = t ( :group ) + t ( :created ) else flash [ :error ] = t ( :group ) + t ( :needs_a_name ) end redirect_to groups_path end
Creates a new group using the information entered on the "new" page
Creates a new group using the information entered on the " new " page