effective_organizations 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d52be5a66c34f0aa18c767a06ed30d2cd231b43ab13e1366cc7ef2a3531ef89
4
- data.tar.gz: ba7b2680295717d510f5cc086c0588cb6048eab03afdc3d495974dbd4d8d57e8
3
+ metadata.gz: 2ce60402fb05740c64591e80c230f056c38f2de281f46535ac9a28830a3bd15d
4
+ data.tar.gz: 983747000777d6a206be7b703885c5826407fcbff1a25c540f99d7869a3328cc
5
5
  SHA512:
6
- metadata.gz: eabee3b007990c185848082fe175b205ae8b666a9f5b183e377aead04285146e0efcbf4b7c9848cbd6b9f9ccca5aa26dbd6f9d4ce3902841c5add09d76df1a19
7
- data.tar.gz: 5cc20f6f1370f40cd0c00c990df1c40deec55434b54726a780a7536a92b3c4116df8e59ad2818772b5f5d7108bb8ddb4aafb70cc1d3b8dcf24753e953b439763
6
+ metadata.gz: eed049b33149af44daf3d148f4dce7398c26a9b5777c157c2587332edefd86059ea377fae4825ad858f3687dc20c7e2c4d63d2f58ff8f940f70a899079ab4dd3
7
+ data.tar.gz: 2d66e0a1b52951e3e5e9c73d623ea1df9ba92cadf8bc2b63efc7abd0892cb79e8764b74f1b97458e8e15eec7b06300997a84e822378b3983a427b4601ff7daca
@@ -53,6 +53,9 @@ module EffectiveOrganizationsOrganization
53
53
  end
54
54
 
55
55
  # Instance Methods
56
+ def to_s
57
+ title.presence || 'organization'
58
+ end
56
59
 
57
60
  def representative(user:)
58
61
  representatives.find { |rep| rep.user_id == user.id }
@@ -1,7 +1,7 @@
1
1
  class CreateEffectiveOrganizations < ActiveRecord::Migration[6.0]
2
2
  def change
3
3
  # Organizations
4
- create_table :organizations do |t|
4
+ create_table <%= @organizations_table_name %> do |t|
5
5
  t.string :title
6
6
 
7
7
  t.string :category
@@ -17,10 +17,10 @@ class CreateEffectiveOrganizations < ActiveRecord::Migration[6.0]
17
17
  t.datetime :created_at
18
18
  end
19
19
 
20
- add_index :organizations, :title
20
+ add_index <%= @organizations_table_name %>, :title
21
21
 
22
22
  # Representatives
23
- create_table :representatives do |t|
23
+ create_table <%= @representatives_table_name %> do |t|
24
24
  t.integer :organization_id
25
25
  t.string :organization_type
26
26
 
@@ -33,8 +33,8 @@ class CreateEffectiveOrganizations < ActiveRecord::Migration[6.0]
33
33
  t.datetime :created_at
34
34
  end
35
35
 
36
- add_index :representatives, [:organization_id, :organization_type]
37
- add_index :representatives, [:user_id, :user_type]
36
+ add_index <%= @representatives_table_name %>, [:organization_id, :organization_type]
37
+ add_index <%= @representatives_table_name %>, [:user_id, :user_type]
38
38
 
39
39
  end
40
40
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrganizations
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_organizations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-21 00:00:00.000000000 Z
11
+ date: 2022-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails