phcdevworks_real_estate 1.1.0 → 1.1.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
  SHA256:
3
- metadata.gz: 546eb0ea036df6044b198bc17c3ea9b3c2e8f8fec3ca5d0bc1cbdc57d2c73165
4
- data.tar.gz: d8388633110bd8230e50d9cbacc7a54e692c1f91f69d9fc6d2ad3c84baadf1d5
3
+ metadata.gz: cd94feb0e505233ecf32975573d654d1fa7f4a86d5174822e72615862f80fde5
4
+ data.tar.gz: 19986a774456fd14cbc0406807215df4ec2eaf218bbf068bcc43c738a5bc1299
5
5
  SHA512:
6
- metadata.gz: ece7ff6356caaef5f21173dac33944c3af3ef3042c124669ce4c8d581b5389092de4976dfd0b9d216511d2d24eadbc8b17691ad65f98175bad823d084b1f920d
7
- data.tar.gz: 5fdbedd5fd52cf613a7af5a2e333fe6291d2e9355e56c0f4d771162b1fe5ec149b7415d6df407914e0f0b06d609b221e0c4260d3a2fbf85f7ca7ac8983f580a8
6
+ metadata.gz: 8e5b21b8ced91920f10b8fb1227f0e4f3e1e4eb8eff8e0fa23df7e71d391473a7c71736af9780be32429fc8df7f03ca5dd90d86c143fdbfd804dc2a42bb176c2
7
+ data.tar.gz: 37a555aac903d90a9fda68e0544c8ac7433000c3b86323cd7ab6306368bbe921900f926ed693866d1cdc90920f3221d3404d86c02c9bdd0d58abc4e54d0fc843
@@ -16,6 +16,7 @@ module PhcdevworksRealEstate
16
16
 
17
17
  # GET /property/features/1
18
18
  def show
19
+ @property_feature = Property::Feature.friendly.find(params[:id])
19
20
  end
20
21
 
21
22
  # GET /property/features/new
@@ -34,7 +35,7 @@ module PhcdevworksRealEstate
34
35
  @property_feature.org_id = current_user.org_id
35
36
  respond_to do |format|
36
37
  if @property_feature.save
37
- format.html { redirect_to property_features_path, :flash => { :success => 'Author has been Added.' }}
38
+ format.html { redirect_to property_features_path, :flash => { :success => 'Property Feature has been Added.' }}
38
39
  format.json { render :show, status: :created, location: @property_feature }
39
40
  else
40
41
  format.html { render :new }
@@ -60,7 +61,7 @@ module PhcdevworksRealEstate
60
61
  def destroy
61
62
  @property_feature.destroy
62
63
  respond_to do |format|
63
- format.html { redirect_to property_features_path, :flash => { :error => 'Category and Connections have all been Removed.' }}
64
+ format.html { redirect_to property_features_path, :flash => { :error => 'Property Feature has been Removed.' }}
64
65
  format.json { head :no_content }
65
66
  end
66
67
  end
@@ -69,7 +70,7 @@ module PhcdevworksRealEstate
69
70
 
70
71
  # Callbacks
71
72
  def set_property_feature
72
- @property_feature = Property::Feature.find(params[:id])
73
+ @property_feature = Property::Feature.friendly.find(params[:id])
73
74
  end
74
75
 
75
76
  # Whitelist
@@ -16,6 +16,7 @@ module PhcdevworksRealEstate
16
16
 
17
17
  # GET /property/listings/1
18
18
  def show
19
+ @property_listing = Property::Listing.friendly.find(params[:id])
19
20
  end
20
21
 
21
22
  # GET /property/listings/new
@@ -34,7 +35,7 @@ module PhcdevworksRealEstate
34
35
  @property_listing.org_id = current_user.org_id
35
36
  respond_to do |format|
36
37
  if @property_listing.save
37
- format.html { redirect_to property_listings_path, :flash => { :success => 'Author has been Added.' }}
38
+ format.html { redirect_to property_listings_path, :flash => { :success => 'Property Listing has been Added.' }}
38
39
  format.json { render :show, status: :created, location: @property_listing }
39
40
  else
40
41
  format.html { render :new }
@@ -60,7 +61,7 @@ module PhcdevworksRealEstate
60
61
  def destroy
61
62
  @property_listing.destroy
62
63
  respond_to do |format|
63
- format.html { redirect_to property_listings_path, :flash => { :error => 'Category and Connections have all been Removed.' }}
64
+ format.html { redirect_to property_listings_path, :flash => { :error => 'Property Listing has been Removed.' }}
64
65
  format.json { head :no_content }
65
66
  end
66
67
  end
@@ -69,7 +70,7 @@ module PhcdevworksRealEstate
69
70
 
70
71
  # Callbacks
71
72
  def set_property_listing
72
- @property_listing = Property::Listing.find(params[:id])
73
+ @property_listing = Property::Listing.friendly.find(params[:id])
73
74
  end
74
75
 
75
76
  # Whitelist
@@ -1,6 +1,9 @@
1
1
  module PhcdevworksRealEstate
2
2
  class Property::Feature < ApplicationRecord
3
3
 
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
+
4
7
  # Relationships
5
8
  has_and_belongs_to_many :listings, class_name: 'Phcreallistingspro::Property::Listing', :join_table => 'features_listings'
6
9
 
@@ -8,5 +11,12 @@ module PhcdevworksRealEstate
8
11
  validates :feature_name,
9
12
  presence: true
10
13
 
14
+ # Clean URL Define
15
+ friendly_id :phcdev_property_feature_nice_urls, use: [:slugged, :finders]
16
+
17
+ def phcdev_property_feature_nice_urls
18
+ [:feature_name]
19
+ end
20
+
11
21
  end
12
22
  end
@@ -1,6 +1,9 @@
1
1
  module PhcdevworksRealEstate
2
2
  class Property::Listing < ApplicationRecord
3
3
 
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
+
4
7
  # Image Uploading
5
8
  has_one_attached :listing_upload
6
9
  has_many_attached :gallery_upload
@@ -21,5 +24,12 @@ module PhcdevworksRealEstate
21
24
  validates :listing_price,
22
25
  presence: true
23
26
 
27
+ # Clean URL Define
28
+ friendly_id :phcdev_property_listing_nice_urls, use: [:slugged, :finders]
29
+
30
+ def phcdev_property_listing_nice_urls
31
+ [:listing_title]
32
+ end
33
+
24
34
  end
25
35
  end
@@ -2,7 +2,7 @@
2
2
  <%= form_with(model: property_feature, local: true) do |phc_pro_property_feature| %>
3
3
 
4
4
  <!-- PHCNotifi Render Validation -->
5
- <%= render 'phcdevworks_notifications/bootstrap/validations', :object => @property_feature %>
5
+ <%= render "phcdevworks_notifications/bootstrap/validations", :object => @property_feature %>
6
6
  <!-- PHCNotifi Render Validation -->
7
7
 
8
8
  <div class="form-group">
@@ -2,7 +2,7 @@
2
2
  <%= form_with(model: property_listing, local: true, html: {class: "add-listing-form"}) do |phc_pro_property_listing| %>
3
3
 
4
4
  <!-- PHCNotifi Render Validation -->
5
- <%= render 'phcdevworks_notifications/bootstrap/validations', :object => @property_listing %>
5
+ <%= render "phcdevworks_notifications/bootstrap/validations", :object => @property_listing %>
6
6
  <!-- PHCNotifi Render Validation -->
7
7
 
8
8
  <div class="form-group">
@@ -41,42 +41,42 @@
41
41
 
42
42
  <div class="form-group">
43
43
  <%= phc_pro_property_listing.label :listing_room %>
44
- <%= phc_pro_property_listing.select(:listing_room, ['1','2','3','4','5','6','7+'], {}, { :class => 'form-control' }) %>
44
+ <%= phc_pro_property_listing.select(:listing_room, ["1","2","3","4","5","6","7+"], {}, { :class => "form-control" }) %>
45
45
  </div>
46
46
  <div class="form-group">
47
47
  <%= phc_pro_property_listing.label :listing_bed %>
48
- <%= phc_pro_property_listing.select(:listing_bed, ['1','2','3','4','5','6','7+'], {}, { :class => 'form-control' }) %>
48
+ <%= phc_pro_property_listing.select(:listing_bed, ["1","2","3","4","5","6","7+"], {}, { :class => "form-control" }) %>
49
49
  </div>
50
50
  <div class="form-group">
51
51
  <%= phc_pro_property_listing.label :listing_bath %>
52
- <%= phc_pro_property_listing.select(:listing_bath, ['1','2','3','4+'], {}, { :class => 'form-control' }) %>
52
+ <%= phc_pro_property_listing.select(:listing_bath, ["1","2","3","4+"], {}, { :class => "form-control" }) %>
53
53
  </div>
54
54
  <div class="form-group">
55
55
  <%= phc_pro_property_listing.label :listing_garage %>
56
- <%= phc_pro_property_listing.select(:listing_garage, ['1 Car','2 Cars','3 Cars','4+ Cars'], {}, { :class => 'form-control' }) %>
56
+ <%= phc_pro_property_listing.select(:listing_garage, ["1 Car","2 Cars","3 Cars","4+ Cars"], {}, { :class => "form-control" }) %>
57
57
  </div>
58
58
 
59
59
  <hr>
60
60
 
61
61
  <div class="form-group">
62
62
  <%= phc_pro_property_listing.label :listing_type %>
63
- <%= phc_pro_property_listing.select(:listing_type, ['House','Condominium','Cottage','Land'], {}, { :class => 'form-control' }) %>
63
+ <%= phc_pro_property_listing.select(:listing_type, ["House","Condominium","Cottage","Land"], {}, { :class => "form-control" }) %>
64
64
  </div>
65
65
  <div class="form-group">
66
66
  <%= phc_pro_property_listing.label :listing_status %>
67
- <%= phc_pro_property_listing.select(:listing_status, ['For Sale','Sold'], {}, { :class => 'form-control' }) %>
67
+ <%= phc_pro_property_listing.select(:listing_status, ["For Sale","Sold"], {}, { :class => "form-control" }) %>
68
68
  </div>
69
69
  <div class="form-group">
70
70
  <%= phc_pro_property_listing.label :listing_year_built %>
71
- <%= phc_pro_property_listing.select(:listing_year_built, ['1990','2018'], {}, { :class => 'form-control' }) %>
71
+ <%= phc_pro_property_listing.select(:listing_year_built, ["1990","2018"], {}, { :class => "form-control" }) %>
72
72
  </div>
73
73
  <div class="form-group">
74
74
  <%= phc_pro_property_listing.label :listing_energy_class %>
75
- <%= phc_pro_property_listing.select(:listing_energy_class, ['A','B'], {}, { :class => 'form-control' }) %>
75
+ <%= phc_pro_property_listing.select(:listing_energy_class, ["A","B"], {}, { :class => "form-control" }) %>
76
76
  </div>
77
77
  <div class="form-group">
78
78
  <%= phc_pro_property_listing.label :listing_leed_rating %>
79
- <%= phc_pro_property_listing.select(:listing_leed_rating, ['Certified','Silver', 'Gold', ''], {}, { :class => 'form-control' }) %>
79
+ <%= phc_pro_property_listing.select(:listing_leed_rating, ["Certified","Silver", "Gold", ""], {}, { :class => "form-control" }) %>
80
80
  </div>
81
81
 
82
82
  <div class="form-group">
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksRealEstate
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_real_estate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-15 00:00:00.000000000 Z
11
+ date: 2019-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails