phcmemberspro 5.3.10 → 5.4.0

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
  SHA1:
3
- metadata.gz: 7c18ddd69d3c271bbde9e861692d777419217cfa
4
- data.tar.gz: 33765b089c6db552ef0a4c081887cb7f15ba96ad
3
+ metadata.gz: 23fa8c21324ad06e4c60ff9b129dcc6bdd33919b
4
+ data.tar.gz: 57622dc94bb0b0c8f75cd99b29e59dd2492a3517
5
5
  SHA512:
6
- metadata.gz: 7c308c5cec890d3fa2a3c2e225e5bdb50ef7559a389d290b7a495be8e90c88fb7f2c97ebaa5c7c6e63135df8932505864ec8187e37bb4c84bcaf2ae83296f6b1
7
- data.tar.gz: 1b5caabf171315e3f27b8d4b8a905e7e24138cddc6967aded6926d40c9bb7f44d7498ac7e529986fc9965adeeb4f1d4bd0f7ecb6ff99e4dfac3d24e26dbd2623
6
+ metadata.gz: 14bdd33cbfcd89cc54f21ecc234bf42a5f193142be34f77218f701390adc9d092818cca87f1af30ae478b977a8230fd1241dc7ada5680ceecb059d33a473e409
7
+ data.tar.gz: 8c8f5f84440d7a1a42a03311ff5c4e08ba55b23c7d0ad5f580aa6ed7dc25414bf127b4aa2fe24d183280272adde7ea98b3ff266d2dfdf40be976ada27fca165f
@@ -1,18 +1,13 @@
1
1
  module Phcmemberspro
2
2
  class Directory::Category < ActiveRecord::Base
3
3
 
4
- # Account Scope
5
- def self.scoped_to(useraccount)
6
- where(:user_id => current_user.id)
7
- end
8
-
9
4
  # Model Relationship
10
5
  has_many :catlists, class_name: 'Directory::Catlist'
11
6
 
12
7
  # Validation for Form Fields
13
8
  validates :catname,
14
9
  presence: true,
15
- uniqueness: true,
10
+ uniqueness => {:scope => :user_id},
16
11
  length: { minimum: 3 }
17
12
 
18
13
  end
@@ -1,11 +1,6 @@
1
1
  module Phcmemberspro
2
2
  class Directory::Catlist < ActiveRecord::Base
3
3
 
4
- # Account Scope
5
- def self.scoped_to(useraccount)
6
- where(:user_id => current_user.id)
7
- end
8
-
9
4
  # Model Relationship
10
5
  belongs_to :category, class_name: 'Directory::Category'
11
6
  belongs_to :business, class_name: 'Members::Business'
@@ -1,11 +1,6 @@
1
1
  module Phcmemberspro
2
2
  class Members::Business < ActiveRecord::Base
3
3
 
4
- # Account Scope
5
- def self.scoped_to(useraccount)
6
- where(:user_id => current_user.id)
7
- end
8
-
9
4
  # Translate Country Code to Name
10
5
  def country_name
11
6
  country = ISO3166::Country[mccountry]
@@ -1,11 +1,6 @@
1
1
  module Phcmemberspro
2
2
  class Members::Contact < ActiveRecord::Base
3
3
 
4
- # Account Scope
5
- def self.scoped_to(useraccount)
6
- where(:user_id => current_user.id)
7
- end
8
-
9
4
  # Translate Country Code to Name
10
5
  def country_name
11
6
  country = ISO3166::Country[mccountry]
@@ -5,11 +5,6 @@ module Phcmemberspro
5
5
  include Gravtastic
6
6
  gravtastic :memail
7
7
 
8
- # Account Scope
9
- def self.scoped_to(useraccount)
10
- where(:user_id => current_user.id)
11
- end
12
-
13
8
  # Model Relationship
14
9
  has_many :businesses, class_name: 'Members::Business', dependent: :destroy
15
10
  has_many :contacts, class_name: 'Members::Contact', dependent: :destroy
@@ -28,12 +23,12 @@ module Phcmemberspro
28
23
 
29
24
  validates :memail,
30
25
  presence: true,
31
- uniqueness: true,
26
+ uniqueness => {:scope => :user_id},
32
27
  length: { minimum: 6 }
33
28
 
34
29
  validates :mphone,
35
30
  presence: true,
36
- uniqueness: true,
31
+ uniqueness => {:scope => :user_id},
37
32
  format: { with: /\A(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}\z/, message: "Please Follow this Phone Number Format: xxx-xxx-xxxx" }
38
33
 
39
34
  end
@@ -1,3 +1,3 @@
1
1
  module Phcmemberspro
2
- VERSION = "5.3.10"
2
+ VERSION = "5.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcmemberspro
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.10
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts