we_bridge_rails_engine_orgs 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/models/org_branch.rb +2 -1
- data/app/models/org_branch_type.rb +1 -0
- data/db/migrate/20151203153522_add_branch_position.rb +5 -0
- data/lib/we_bridge_rails_engine_orgs/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +6 -5
- data/spec/dummy/log/development.log +167 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e985cea2955b94b2e16aa73f72f65574ad26b09
|
4
|
+
data.tar.gz: 8e1691d52ba938472ad6c8686f8a237e8af52cd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86bfd633a0a335878a4f2b3441e56d9b7646e7ed6def982db3391b5487e965ed5456d749e3544e2b9f1b4eee1b070a13bbe948be4e7db94e5e52b33ebdb24a72
|
7
|
+
data.tar.gz: 3b23a207085e01da274b47dba912083eaa583b1be27e58260f99539391fc5214fc1db17f5bedf774f2436d06cd434be2df78b82d8377bbc893ff860456647fce
|
data/Gemfile.lock
CHANGED
data/app/models/org_branch.rb
CHANGED
@@ -5,7 +5,8 @@ class OrgBranch < ActiveRecord::Base
|
|
5
5
|
belongs_to :org_branch_type
|
6
6
|
include ActiveRecord::Mlang
|
7
7
|
include ActionView::Helpers::AutoTagHelper::FormInfo
|
8
|
-
set_accessible_attrs :org_branch_type_id
|
8
|
+
set_accessible_attrs :org_branch_type_id, :position
|
9
|
+
default_scope ->(){ order :position, :id }
|
9
10
|
|
10
11
|
def __display__
|
11
12
|
self.text.name + self.org_branch_type.__display__
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20151203153522) do
|
15
15
|
|
16
16
|
create_table "lang_texts", force: :cascade do |t|
|
17
17
|
t.integer "parent_id", null: false
|
@@ -90,10 +90,11 @@ ActiveRecord::Schema.define(version: 20151009112829) do
|
|
90
90
|
end
|
91
91
|
|
92
92
|
create_table "org_branches", force: :cascade do |t|
|
93
|
-
t.integer "org_branch_type_id",
|
94
|
-
t.integer "org_id",
|
95
|
-
t.datetime "created_at",
|
96
|
-
t.datetime "updated_at",
|
93
|
+
t.integer "org_branch_type_id", null: false
|
94
|
+
t.integer "org_id", null: false
|
95
|
+
t.datetime "created_at", null: false
|
96
|
+
t.datetime "updated_at", null: false
|
97
|
+
t.integer "position", default: 0, null: false
|
97
98
|
end
|
98
99
|
|
99
100
|
create_table "org_director_type_texts", force: :cascade do |t|
|
@@ -26054,3 +26054,170 @@ Completed 200 OK in 157ms (Views: 148.4ms | ActiveRecord: 4.6ms)
|
|
26054
26054
|
[1m[35mOrgMember Load (0.3ms)[0m SELECT "org_members".* FROM "org_members" WHERE "org_members"."org_id" = ? [["org_id", 1]]
|
26055
26055
|
[1m[36mOrg Load (1.2ms)[0m [1mSELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1[0m
|
26056
26056
|
[1m[35mOrgMember Load (0.2ms)[0m SELECT "org_members".* FROM "org_members" WHERE "org_members"."org_id" = ? [["org_id", 1]]
|
26057
|
+
[1m[36mOrgBranch Load (1.9ms)[0m [1mSELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC[0m
|
26058
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
26059
|
+
Migrating to AddBranchPosition (20151203153522)
|
26060
|
+
[1m[35m (0.2ms)[0m begin transaction
|
26061
|
+
[1m[36m (0.6ms)[0m [1mALTER TABLE "org_branches" ADD "position" integer NOT NULL[0m
|
26062
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
26063
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
26064
|
+
Migrating to AddBranchPosition (20151203153522)
|
26065
|
+
[1m[35m (0.2ms)[0m begin transaction
|
26066
|
+
[1m[36m (0.6ms)[0m [1mALTER TABLE "org_branches" ADD "position" integer DEFAULT 0 NOT NULL[0m
|
26067
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151203153522"]]
|
26068
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
26069
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
26070
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26071
|
+
FROM sqlite_master
|
26072
|
+
WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
|
26073
|
+
UNION ALL
|
26074
|
+
SELECT sql
|
26075
|
+
FROM sqlite_temp_master
|
26076
|
+
WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
|
26077
|
+
[0m
|
26078
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
26079
|
+
FROM sqlite_master
|
26080
|
+
WHERE name='index_langs_on_code' AND type='index'
|
26081
|
+
UNION ALL
|
26082
|
+
SELECT sql
|
26083
|
+
FROM sqlite_temp_master
|
26084
|
+
WHERE name='index_langs_on_code' AND type='index'
|
26085
|
+
|
26086
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26087
|
+
FROM sqlite_master
|
26088
|
+
WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
|
26089
|
+
UNION ALL
|
26090
|
+
SELECT sql
|
26091
|
+
FROM sqlite_temp_master
|
26092
|
+
WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
|
26093
|
+
[0m
|
26094
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
26095
|
+
FROM sqlite_master
|
26096
|
+
WHERE name='index_org_branch_member_mappings' AND type='index'
|
26097
|
+
UNION ALL
|
26098
|
+
SELECT sql
|
26099
|
+
FROM sqlite_temp_master
|
26100
|
+
WHERE name='index_org_branch_member_mappings' AND type='index'
|
26101
|
+
|
26102
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26103
|
+
FROM sqlite_master
|
26104
|
+
WHERE name='index_org_branch_texts' AND type='index'
|
26105
|
+
UNION ALL
|
26106
|
+
SELECT sql
|
26107
|
+
FROM sqlite_temp_master
|
26108
|
+
WHERE name='index_org_branch_texts' AND type='index'
|
26109
|
+
[0m
|
26110
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
26111
|
+
FROM sqlite_master
|
26112
|
+
WHERE name='index_org_branch_type_texts' AND type='index'
|
26113
|
+
UNION ALL
|
26114
|
+
SELECT sql
|
26115
|
+
FROM sqlite_temp_master
|
26116
|
+
WHERE name='index_org_branch_type_texts' AND type='index'
|
26117
|
+
|
26118
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26119
|
+
FROM sqlite_master
|
26120
|
+
WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
|
26121
|
+
UNION ALL
|
26122
|
+
SELECT sql
|
26123
|
+
FROM sqlite_temp_master
|
26124
|
+
WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
|
26125
|
+
[0m
|
26126
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
26127
|
+
FROM sqlite_master
|
26128
|
+
WHERE name='index_org_member_tag_mappings' AND type='index'
|
26129
|
+
UNION ALL
|
26130
|
+
SELECT sql
|
26131
|
+
FROM sqlite_temp_master
|
26132
|
+
WHERE name='index_org_member_tag_mappings' AND type='index'
|
26133
|
+
|
26134
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26135
|
+
FROM sqlite_master
|
26136
|
+
WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
|
26137
|
+
UNION ALL
|
26138
|
+
SELECT sql
|
26139
|
+
FROM sqlite_temp_master
|
26140
|
+
WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
|
26141
|
+
[0m
|
26142
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
26143
|
+
FROM sqlite_master
|
26144
|
+
WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
|
26145
|
+
UNION ALL
|
26146
|
+
SELECT sql
|
26147
|
+
FROM sqlite_temp_master
|
26148
|
+
WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
|
26149
|
+
|
26150
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
26151
|
+
FROM sqlite_master
|
26152
|
+
WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
|
26153
|
+
UNION ALL
|
26154
|
+
SELECT sql
|
26155
|
+
FROM sqlite_temp_master
|
26156
|
+
WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
|
26157
|
+
[0m
|
26158
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
26159
|
+
FROM sqlite_master
|
26160
|
+
WHERE name='index_org_texts' AND type='index'
|
26161
|
+
UNION ALL
|
26162
|
+
SELECT sql
|
26163
|
+
FROM sqlite_temp_master
|
26164
|
+
WHERE name='index_org_texts' AND type='index'
|
26165
|
+
|
26166
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26167
|
+
FROM sqlite_master
|
26168
|
+
WHERE name='idx_person_name_texts' AND type='index'
|
26169
|
+
UNION ALL
|
26170
|
+
SELECT sql
|
26171
|
+
FROM sqlite_temp_master
|
26172
|
+
WHERE name='idx_person_name_texts' AND type='index'
|
26173
|
+
[0m
|
26174
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
26175
|
+
FROM sqlite_master
|
26176
|
+
WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
|
26177
|
+
UNION ALL
|
26178
|
+
SELECT sql
|
26179
|
+
FROM sqlite_temp_master
|
26180
|
+
WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
|
26181
|
+
|
26182
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26183
|
+
FROM sqlite_master
|
26184
|
+
WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
|
26185
|
+
UNION ALL
|
26186
|
+
SELECT sql
|
26187
|
+
FROM sqlite_temp_master
|
26188
|
+
WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
|
26189
|
+
[0m
|
26190
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
26191
|
+
FROM sqlite_master
|
26192
|
+
WHERE name='index_sessions_on_updated_at' AND type='index'
|
26193
|
+
UNION ALL
|
26194
|
+
SELECT sql
|
26195
|
+
FROM sqlite_temp_master
|
26196
|
+
WHERE name='index_sessions_on_updated_at' AND type='index'
|
26197
|
+
|
26198
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26199
|
+
FROM sqlite_master
|
26200
|
+
WHERE name='index_sessions_on_session_id' AND type='index'
|
26201
|
+
UNION ALL
|
26202
|
+
SELECT sql
|
26203
|
+
FROM sqlite_temp_master
|
26204
|
+
WHERE name='index_sessions_on_session_id' AND type='index'
|
26205
|
+
[0m
|
26206
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
26207
|
+
FROM sqlite_master
|
26208
|
+
WHERE name='index_user_accounts_on_uid' AND type='index'
|
26209
|
+
UNION ALL
|
26210
|
+
SELECT sql
|
26211
|
+
FROM sqlite_temp_master
|
26212
|
+
WHERE name='index_user_accounts_on_uid' AND type='index'
|
26213
|
+
|
26214
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26215
|
+
FROM sqlite_master
|
26216
|
+
WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
|
26217
|
+
UNION ALL
|
26218
|
+
SELECT sql
|
26219
|
+
FROM sqlite_temp_master
|
26220
|
+
WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
|
26221
|
+
[0m
|
26222
|
+
[1m[35mOrgBranch Load (2.5ms)[0m SELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC
|
26223
|
+
[1m[36mOrgBranch Load (1.1ms)[0m [1mSELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC[0m
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: we_bridge_rails_engine_orgs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shinjiro Itagaki
|
@@ -300,6 +300,7 @@ files:
|
|
300
300
|
- db/migrate/20150812025526_create_orgs.rb
|
301
301
|
- db/migrate/20150814183339_create_org_branches_table.rb
|
302
302
|
- db/migrate/20151009112829_delete_names.rb
|
303
|
+
- db/migrate/20151203153522_add_branch_position.rb
|
303
304
|
- lib/tasks/we_bridge_rails_engine_orgs_tasks.rake
|
304
305
|
- lib/we_bridge_rails_engine_orgs.rb
|
305
306
|
- lib/we_bridge_rails_engine_orgs/engine.rb
|