phcmemberspro 1.6.0 → 1.6.1

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: eb3629821d30157c563389f13f12d2cd9b26159a
4
- data.tar.gz: c45f450220f117019e4701e9332803748d155ded
3
+ metadata.gz: 27d0d33758c2dcb98bf3171d6bb677b249589087
4
+ data.tar.gz: 3fa3e04aea457d0a4d0a651162795ef5f7fbd7d5
5
5
  SHA512:
6
- metadata.gz: ed930e8954a5887697a08b545d9fc7039b3594f294ec7a9c3892de2aaae3cf721d9ed580f9f7fc8600323c94834c081c5a98887501a2736c122d636110e43b8d
7
- data.tar.gz: 5bd244c0785d00e124a223cafb1482e3a3173463eabe52a8479949fd3365da5e88de47462e737459f0c85705d055a0fe1810fc58fecd2a388e36cd1a54995f14
6
+ metadata.gz: df443ee9ce1960a767110758be5e1fae8ee4483638035a12aff8c327aa86b7e6338c47917a23701eed978f54bfce4d2e27fdd8f76713fbea8e65da9a4aa0f392
7
+ data.tar.gz: 4a9b7a12cb7f39ef907096d8b4aa1f370beb0e64fad019bcab8cd2c1264ec1539307934cd2631837bd7796861f7f990a11159ae56ebe728b86a6d45e72379d71
@@ -10,7 +10,7 @@ module Phcmemberspro
10
10
 
11
11
  # Directory Category Index
12
12
  def index
13
- @directory_categories = Directory::Category.scoped_to(current_account).order('catname ASC')
13
+ @directory_categories = Directory::Category.current_user.order('catname ASC')
14
14
  end
15
15
 
16
16
  # Directory Category Details
@@ -19,7 +19,7 @@ module Phcmemberspro
19
19
 
20
20
  # New Directory Category
21
21
  def new
22
- @directory_category = Directory::Category.scoped_to(current_account).new
22
+ @directory_category = Directory::Category.current_user.new
23
23
  end
24
24
 
25
25
  # Edit Directory Category
@@ -28,7 +28,7 @@ module Phcmemberspro
28
28
 
29
29
  # Create Action
30
30
  def create
31
- @directory_category = Directory::Category.scoped_to(current_account).new(directory_category_params)
31
+ @directory_category = Directory::Category.current_user.new(directory_category_params)
32
32
  if @directory_category.save
33
33
  redirect_to directory_categories_path, notice: 'Category was successfully created.'
34
34
  else
@@ -38,7 +38,7 @@ module Phcmemberspro
38
38
 
39
39
  # Update Action
40
40
  def update
41
- if @directory_category.scoped_to(current_account).update(directory_category_params)
41
+ if @directory_category.current_user.update(directory_category_params)
42
42
  redirect_to directory_categories_path, notice: 'Category was successfully updated.'
43
43
  else
44
44
  render :edit
@@ -47,7 +47,7 @@ module Phcmemberspro
47
47
 
48
48
  # Delete Action
49
49
  def destroy
50
- @directory_category.scoped_to(current_account).destroy
50
+ @directory_category.current_user.destroy
51
51
  redirect_to directory_categories_path, notice: 'Category was successfully destroyed.'
52
52
  end
53
53
 
@@ -60,7 +60,7 @@ module Phcmemberspro
60
60
 
61
61
  # whitelist
62
62
  def directory_category_params
63
- params.require(:directory_category).permit(:catname, :account_id)
63
+ params.require(:directory_category).permit(:catname, :user_id)
64
64
  end
65
65
 
66
66
  end
@@ -17,25 +17,25 @@ module Phcmemberspro
17
17
  # Directory Listing Index
18
18
  def index
19
19
  category = Directory::Category.find(params[:category_id])
20
- @directory_catlists = category.catlists.scoped_to(current_account)
20
+ @directory_catlists = category.catlists.current_user
21
21
  end
22
22
 
23
23
  # Show Directory Listing
24
24
  def show
25
25
  category = Directory::Category.find(params[:category_id])
26
- @directory_catlist = category.catlists.scoped_to(current_account).find(params[:id])
26
+ @directory_catlist = category.catlists.current_user.find(params[:id])
27
27
  end
28
28
 
29
29
  # New Directory Listing
30
30
  def new
31
31
  category = Directory::Category.find(params[:category_id])
32
- @directory_catlist = category.catlists.scoped_to(current_account).build
32
+ @directory_catlist = category.catlists.current_user.build
33
33
  end
34
34
 
35
35
  # Edit Directory Listing Action
36
36
  def edit
37
37
  category = Directory::Category.find(params[:category_id])
38
- @directory_catlist = category.catlists.scoped_to(current_account).find(params[:id])
38
+ @directory_catlist = category.catlists.current_user.find(params[:id])
39
39
  respond_to do |format|
40
40
  format.html # new.html.erb
41
41
  format.xml { render :xml => @directory_catlist }
@@ -45,7 +45,7 @@ module Phcmemberspro
45
45
  # Create Directory Listing Action
46
46
  def create
47
47
  @category = Directory::Category.find(params[:category_id])
48
- @directory_catlist = @category.catlists.scoped_to(current_account).create(directory_catlist_params)
48
+ @directory_catlist = @category.catlists.current_user.create(directory_catlist_params)
49
49
  respond_to do |format|
50
50
  if @directory_catlist.save
51
51
  format.html { redirect_to directory_category_catlists_path, notice: 'Comment for Directorycategory was Successfully Created.' }
@@ -60,7 +60,7 @@ module Phcmemberspro
60
60
  # Update Directory Listing Action
61
61
  def update
62
62
  respond_to do |format|
63
- if @directory_catlist.scoped_to(current_account).update(directory_catlist_params)
63
+ if @directory_catlist.current_user.update(directory_catlist_params)
64
64
  format.html { redirect_to directory_category_catlists_path, notice: 'Comment for Directorycategory was Successfully Updated.' }
65
65
  format.json { head :no_content }
66
66
  else
@@ -74,7 +74,7 @@ module Phcmemberspro
74
74
  def destroy
75
75
  @category = Directory::Category.find(params[:category_id])
76
76
  @directory_catlist = @category.catlists.find(params[:id])
77
- @directory_catlist.scoped_to(current_account).destroy
77
+ @directory_catlist.current_user.destroy
78
78
  respond_to do |format|
79
79
  format.html { redirect_to directory_category_catlists_path, notice: 'Comment for Directorycategory was Successfully Deleted.' }
80
80
  format.json { head :no_content }
@@ -85,12 +85,12 @@ module Phcmemberspro
85
85
 
86
86
  # Common Callbacks
87
87
  def set_directory_catlist
88
- @directory_catlist = Directory::Catlist.scoped_to(current_account).find(params[:id])
88
+ @directory_catlist = Directory::Catlist.current_user.find(params[:id])
89
89
  end
90
90
 
91
91
  # Whitelists
92
92
  def directory_catlist_params
93
- params.require(:directory_catlist).permit(:listing_id, :category_id, :account_id)
93
+ params.require(:directory_catlist).permit(:listing_id, :category_id, :user_id)
94
94
  end
95
95
 
96
96
  end
@@ -18,19 +18,19 @@ module Phcmemberspro
18
18
  # Member Contact Index
19
19
  def index
20
20
  main = Members::Main.find(params[:main_id])
21
- @members_contacts = main.contacts.scoped_to(current_account).order('mccontactname ASC')
21
+ @members_contacts = main.contacts.current_user.order('mccontactname ASC')
22
22
  end
23
23
 
24
24
  # Detailed Member Contact Information
25
25
  def show
26
26
  main = Members::Main.find(params[:main_id])
27
- @members_contact = main.contacts.scoped_to(current_account).find(params[:id])
27
+ @members_contact = main.contacts.current_user.find(params[:id])
28
28
  end
29
29
 
30
30
  # New Contact
31
31
  def new
32
32
  main = Members::Main.find(params[:main_id])
33
- @members_contact = main.contacts.scoped_to(current_account).build
33
+ @members_contact = main.contacts.current_user.build
34
34
  respond_to do |format|
35
35
  format.html # new.html.erb
36
36
  format.xml { render :xml => @members_contact }
@@ -40,13 +40,13 @@ module Phcmemberspro
40
40
  # Edit Contact
41
41
  def edit
42
42
  main = Members::Main.find(params[:main_id])
43
- @members_contact = main.contacts.scoped_to(current_account).find(params[:id])
43
+ @members_contact = main.contacts.current_user.find(params[:id])
44
44
  end
45
45
 
46
46
  # Create Action
47
47
  def create
48
48
  @main = Members::Main.find(params[:main_id])
49
- @members_contact = @main.contacts.scoped_to(current_account).create(members_contact_params)
49
+ @members_contact = @main.contacts.current_user.create(members_contact_params)
50
50
  if @members_contact.save
51
51
  redirect_to members_main_contacts_path, notice: 'Member contact information was successfully created.'
52
52
  else
@@ -56,7 +56,7 @@ module Phcmemberspro
56
56
 
57
57
  # Update Action
58
58
  def update
59
- if @members_contact.scoped_to(current_account).update(members_contact_params)
59
+ if @members_contact.current_user.update(members_contact_params)
60
60
  redirect_to members_main_contacts_path, notice: 'Member contact information was successfully updated.'
61
61
  else
62
62
  render :edit
@@ -66,7 +66,7 @@ module Phcmemberspro
66
66
  # Delete Action
67
67
  def destroy
68
68
  @main = Members::Main.find(params[:main_id])
69
- @members_contact = @main.contacts.scoped_to(current_account).find(params[:id])
69
+ @members_contact = @main.contacts.current_user.find(params[:id])
70
70
  @members_contact.destroy
71
71
  redirect_to members_main_contacts_path, notice: 'Member contact information was successfully destroyed.'
72
72
  end
@@ -80,7 +80,7 @@ module Phcmemberspro
80
80
 
81
81
  # White List
82
82
  def members_contact_params
83
- params.require(:members_contact).permit(:mccontactname, :mccompanyname, :mcaddressl1, :mcaddressl2, :mccity, :mcprovince, :mccountry, :mcpostalcode, :mcphone, :mcwebsite, :mcemail, :main_id, :account_id)
83
+ params.require(:members_contact).permit(:mccontactname, :mccompanyname, :mcaddressl1, :mcaddressl2, :mccity, :mcprovince, :mccountry, :mcpostalcode, :mcphone, :mcwebsite, :mcemail, :main_id, :user_id)
84
84
  end
85
85
 
86
86
  end
@@ -18,19 +18,19 @@ module Phcmemberspro
18
18
  # Member Listing Index
19
19
  def index
20
20
  main = Members::Main.find(params[:main_id])
21
- @members_listings = main.listings.scoped_to(current_account).order('mlcontactname ASC')
21
+ @members_listings = main.listings.current_user.order('mlcontactname ASC')
22
22
  end
23
23
 
24
24
  # Detailed Member Listing
25
25
  def show
26
26
  main = Members::Main.find(params[:main_id])
27
- @members_listing = main.listings.scoped_to(current_account).find(params[:id])
27
+ @members_listing = main.listings.current_user.find(params[:id])
28
28
  end
29
29
 
30
30
  # New Member Listing
31
31
  def new
32
32
  main = Members::Main.find(params[:main_id])
33
- @members_listing = main.listings.scoped_to(current_account).build
33
+ @members_listing = main.listings.current_user.build
34
34
  respond_to do |format|
35
35
  format.html # new.html.erb
36
36
  format.xml { render :xml => @members_listing }
@@ -40,13 +40,13 @@ module Phcmemberspro
40
40
  # Edit Member Listing
41
41
  def edit
42
42
  main = Members::Main.find(params[:main_id])
43
- @members_listing = main.listings.scoped_to(current_account).find(params[:id])
43
+ @members_listing = main.listings.current_user.find(params[:id])
44
44
  end
45
45
 
46
46
  # Create Action
47
47
  def create
48
48
  @main = Members::Main.find(params[:main_id])
49
- @members_listing = @main.listings.scoped_to(current_account).create(members_listing_params)
49
+ @members_listing = @main.listings.current_user.create(members_listing_params)
50
50
  if @members_listing.save
51
51
  redirect_to members_main_listings_path, notice: 'Listing was successfully created.'
52
52
  else
@@ -56,7 +56,7 @@ module Phcmemberspro
56
56
 
57
57
  # Update Action
58
58
  def update
59
- if @members_listing.scoped_to(current_account).update(members_listing_params)
59
+ if @members_listing.current_user.update(members_listing_params)
60
60
  redirect_to members_main_listings_path, notice: 'Listing was successfully updated.'
61
61
  else
62
62
  render :edit
@@ -66,7 +66,7 @@ module Phcmemberspro
66
66
  # Delete Action
67
67
  def destroy
68
68
  @main = Members::Main.find(params[:main_id])
69
- @members_listing = @main.listings.scoped_to(current_account).find(params[:id])
69
+ @members_listing = @main.listings.current_user.find(params[:id])
70
70
  @members_listing.destroy
71
71
  redirect_to members_main_listings_path, notice: 'Listing was successfully destroyed.'
72
72
  end
@@ -80,7 +80,7 @@ module Phcmemberspro
80
80
 
81
81
  # White List
82
82
  def members_listing_params
83
- params.require(:members_listing).permit(:mlcontactname, :mlcompanyname, :mladdressl1, :mladdressl2, :mlcity, :mlprovince, :mlcountry, :mlpostalcode, :mlphone, :mlwebsite, :mlemail, :main_id, :account_id)
83
+ params.require(:members_listing).permit(:mlcontactname, :mlcompanyname, :mladdressl1, :mladdressl2, :mlcity, :mlprovince, :mlcountry, :mlpostalcode, :mlphone, :mlwebsite, :mlemail, :main_id, :user_id)
84
84
  end
85
85
 
86
86
  end
@@ -10,7 +10,7 @@ module Phcmemberspro
10
10
 
11
11
  # Member Profile List
12
12
  def index
13
- @members_mains = Members::Main.scoped_to(current_account)
13
+ @members_mains = Members::Main.current_user
14
14
  end
15
15
 
16
16
  # Detailed Member Profile
@@ -19,7 +19,7 @@ module Phcmemberspro
19
19
 
20
20
  # New Member Profile
21
21
  def new
22
- @members_main = Members::Main.scoped_to(current_account).new
22
+ @members_main = Members::Main.current_user.new
23
23
  end
24
24
 
25
25
  # Edit Member Profile
@@ -28,7 +28,7 @@ module Phcmemberspro
28
28
 
29
29
  # Create Member Profile Action
30
30
  def create
31
- @members_main = Members::Main.scoped_to(current_account).new(members_main_params)
31
+ @members_main = Members::Main.current_user.new(members_main_params)
32
32
  if @members_main.save
33
33
  redirect_to members_mains_path, notice: 'Member profile was successfully created.'
34
34
  else
@@ -38,7 +38,7 @@ module Phcmemberspro
38
38
 
39
39
  # Update Member Profile Action
40
40
  def update
41
- if @members_main.scoped_to(current_account).update(members_main_params)
41
+ if @members_main.current_user.update(members_main_params)
42
42
  redirect_to members_mains_path, notice: 'Member profile was successfully updated.'
43
43
  else
44
44
  render :edit
@@ -47,7 +47,7 @@ module Phcmemberspro
47
47
 
48
48
  # Delete Member Profile Action
49
49
  def destroy
50
- @members_main.scoped_to(current_account).destroy
50
+ @members_main.current_user.destroy
51
51
  redirect_to members_mains_path, notice: 'Member profile was successfully destroyed.'
52
52
  end
53
53
 
@@ -55,12 +55,12 @@ module Phcmemberspro
55
55
 
56
56
  # Common Callbacks
57
57
  def set_members_main
58
- @members_main = Members::Main.scoped_to(current_account).find(params[:id])
58
+ @members_main = Members::Main.current_user.find(params[:id])
59
59
  end
60
60
 
61
61
  # White List
62
62
  def members_main_params
63
- params.require(:members_main).permit(:mfirstname, :mlastname, :mtitle, :memail, :mphone, :mnotes, :account_id)
63
+ params.require(:members_main).permit(:mfirstname, :mlastname, :mtitle, :memail, :mphone, :mnotes, :user_id)
64
64
  end
65
65
 
66
66
  end
@@ -3,7 +3,6 @@ module Phcmemberspro
3
3
 
4
4
  # Required Dependencies
5
5
  require 'figaro'
6
- require 'mtdevise'
7
6
 
8
7
  # Isolate Namespace for PHC Members
9
8
  isolate_namespace Phcmemberspro
@@ -1,3 +1,3 @@
1
1
  module Phcmemberspro
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
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: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts