Merge branch 'master' into fix/side-bar-layout

This commit is contained in:
Felix Van der Jeugt 2016-02-05 19:52:37 +01:00
commit 6dc80bbaeb
4 changed files with 9 additions and 3 deletions

View file

@ -40,3 +40,7 @@
div.out-of-stock {
border-color:red;
}
.expand {
overflow: hidden;
}

View file

@ -43,6 +43,6 @@ class UsersController < ApplicationController
end
def init
@user = User.find_by_id(params[:id]) || current_user
@user ||= current_user
end
end

View file

@ -25,7 +25,9 @@ class Ability
def initialize_user(user)
can :read, :all
can :manage, User, id: user.id
can :create, Order, user: user
can :create, Order do |order|
order.user == user
end
can :destroy, Order do |order|
order.try(:user) == user && order.deletable
end

View file

@ -1,4 +1,4 @@
%div{role: "tabpanel"}
.expand{role: "tabpanel"}
/ Nav tabs
%ul.nav.nav-tabs{role: "tablist"}
%li.active{role: "presentation"}