mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 16:53:23 -05:00
Renamed UserRoles to UserRole Joins, Needed ID column in user_role_joins table
This commit is contained in:
parent
91bb2ea43e
commit
a083ed715b
@ -37,7 +37,7 @@ class AppTabPanel < Netzke::Basepack::TabPanel
|
||||
wrappedComponent: :transactions_border,
|
||||
title: "Transactions"},
|
||||
:logs,
|
||||
:user_roles
|
||||
:user_role_joins
|
||||
]
|
||||
end
|
||||
|
||||
@ -48,7 +48,6 @@ class AppTabPanel < Netzke::Basepack::TabPanel
|
||||
self.class.component item[:wrappedComponent]
|
||||
end
|
||||
end
|
||||
|
||||
c.prevent_header = true
|
||||
c.tbar = [:sign_out]
|
||||
c.items = @@app_tab_panel_items
|
||||
|
@ -1,10 +1,10 @@
|
||||
class UserRoles < Netzke::Basepack::Grid
|
||||
|
||||
class UserRoleJoins < Netzke::Basepack::Grid
|
||||
def configure(c)
|
||||
super
|
||||
c.model = "UserRoleJoin"
|
||||
c.title = "User Roles"
|
||||
#c.columns = [ :user__first_name, :role__role, :created_at, :updated_at, :ends ]
|
||||
c.columns = [ :user__first_name, :role__role, :created_at, :updated_at, :ends ]
|
||||
#c.columns = [ :user__first_name]
|
||||
end
|
||||
|
||||
#override with nil to remove actions
|
@ -1,5 +1,5 @@
|
||||
class UserRoleJoin < ActiveRecord::Base
|
||||
#set_table_name :user_role_joins
|
||||
set_table_name :user_role_joins
|
||||
attr_accessible :role_id, :user_id
|
||||
|
||||
belongs_to :user
|
||||
|
@ -3,7 +3,6 @@ class AlterUserRoles < ActiveRecord::Migration
|
||||
rename_table :user_roles, :user_role_joins
|
||||
change_table :user_role_joins do |t|
|
||||
t.rename :role, :role_id
|
||||
t.remove :id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -154,7 +154,7 @@ ActiveRecord::Schema.define(:version => 20130424005701) do
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "user_role_joins", :id => false, :force => true do |t|
|
||||
create_table "user_role_joins", :force => true do |t|
|
||||
t.string "role_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
|
Loading…
x
Reference in New Issue
Block a user