Merge branch 'master' into fix/side-bar-layout
This commit is contained in:
commit
6dc80bbaeb
4 changed files with 9 additions and 3 deletions
|
@ -40,3 +40,7 @@
|
|||
div.out-of-stock {
|
||||
border-color:red;
|
||||
}
|
||||
|
||||
.expand {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,6 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def init
|
||||
@user = User.find_by_id(params[:id]) || current_user
|
||||
@user ||= current_user
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%div{role: "tabpanel"}
|
||||
.expand{role: "tabpanel"}
|
||||
/ Nav tabs
|
||||
%ul.nav.nav-tabs{role: "tablist"}
|
||||
%li.active{role: "presentation"}
|
||||
|
|
Loading…
Reference in a new issue