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,
|
wrappedComponent: :transactions_border,
|
||||||
title: "Transactions"},
|
title: "Transactions"},
|
||||||
:logs,
|
:logs,
|
||||||
:user_roles
|
:user_role_joins
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -48,7 +48,6 @@ class AppTabPanel < Netzke::Basepack::TabPanel
|
|||||||
self.class.component item[:wrappedComponent]
|
self.class.component item[:wrappedComponent]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
c.prevent_header = true
|
c.prevent_header = true
|
||||||
c.tbar = [:sign_out]
|
c.tbar = [:sign_out]
|
||||||
c.items = @@app_tab_panel_items
|
c.items = @@app_tab_panel_items
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
class UserRoles < Netzke::Basepack::Grid
|
class UserRoleJoins < Netzke::Basepack::Grid
|
||||||
|
|
||||||
def configure(c)
|
def configure(c)
|
||||||
super
|
super
|
||||||
c.model = "UserRoleJoin"
|
c.model = "UserRoleJoin"
|
||||||
c.title = "User Roles"
|
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
|
end
|
||||||
|
|
||||||
#override with nil to remove actions
|
#override with nil to remove actions
|
@ -1,5 +1,5 @@
|
|||||||
class UserRoleJoin < ActiveRecord::Base
|
class UserRoleJoin < ActiveRecord::Base
|
||||||
#set_table_name :user_role_joins
|
set_table_name :user_role_joins
|
||||||
attr_accessible :role_id, :user_id
|
attr_accessible :role_id, :user_id
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
@ -3,7 +3,6 @@ class AlterUserRoles < ActiveRecord::Migration
|
|||||||
rename_table :user_roles, :user_role_joins
|
rename_table :user_roles, :user_role_joins
|
||||||
change_table :user_role_joins do |t|
|
change_table :user_role_joins do |t|
|
||||||
t.rename :role, :role_id
|
t.rename :role, :role_id
|
||||||
t.remove :id
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -154,7 +154,7 @@ ActiveRecord::Schema.define(:version => 20130424005701) do
|
|||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
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.string "role_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user