Changing UserRole to UserRoleJoin

Beware, this breaks the view for some reason
This commit is contained in:
Jason Denney
2013-04-23 23:21:17 -04:00
parent a3fcdec10c
commit 91bb2ea43e
17 changed files with 100 additions and 37 deletions
+2 -1
View File
@@ -37,7 +37,8 @@ class AppTabPanel < Netzke::Basepack::TabPanel
wrappedComponent: :transactions_border,
title: "Transactions"},
:logs,
:user_roles]
:user_roles
]
end
@@app_tab_panel_items.each do |item|
+1 -1
View File
@@ -53,7 +53,7 @@ class UserLogs < Netzke::Basepack::Grid
bike_store = Bike.all.map { |b| [b.id, b.shop_id] }
current_user ||= User.find_by_id(session[:selected_user_id]) || controller.current_user
bike_id = current_user.bike.nil? ? nil : current_user.bike.id
action_id = current_user.user_role.id
action_id = ::ActsAsLoggable::UserAction.all.first.id
[
{ :name => :start_date},
{ :name => :end_date},
+2 -2
View File
@@ -2,9 +2,9 @@ class UserRoles < Netzke::Basepack::Grid
def configure(c)
super
c.model = "UserRole"
c.model = "UserRoleJoin"
c.title = "User Roles"
c.columns = [ :role, :created_at, :updated_at, :ends ]
#c.columns = [ :user__first_name, :role__role, :created_at, :updated_at, :ends ]
end
#override with nil to remove actions
-1
View File
@@ -9,7 +9,6 @@ class Users < Netzke::Basepack::Grid
:last_name,
:nickname,
:email,
:user_role__role,
:bike__shop_id
]
end