Fixed broken link on startpage for non ordergroup members.
This commit is contained in:
parent
ce375e1637
commit
116b1c4ed9
1 changed files with 29 additions and 23 deletions
|
@ -35,6 +35,8 @@ class HomeController < ApplicationController
|
|||
def ordergroup
|
||||
@user = @current_user
|
||||
@ordergroup = @user.ordergroup
|
||||
|
||||
unless @ordergroup.nil?
|
||||
@ordergroup_column_names = ["Description", "Actual Size", "Balance", "Updated"]
|
||||
@ordergroup_columns = ["description", "account_balance", "account_updated"]
|
||||
|
||||
|
@ -65,6 +67,10 @@ class HomeController < ApplicationController
|
|||
format.html # myOrdergroup.haml
|
||||
format.js { render :partial => "finance/transactions/list" }
|
||||
end
|
||||
else
|
||||
flash[:error] = "Leider bist Du kein Mitglied einer Bestellgruppe"
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
|
||||
# cancel personal memberships direct from the myProfile-page
|
||||
|
|
Loading…
Reference in a new issue