phcdevworks_members 2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/phcdevworks_members/directory/categories.scss +0 -3
  3. data/app/assets/stylesheets/phcdevworks_members/member/addresses.scss +0 -3
  4. data/app/assets/stylesheets/phcdevworks_members/member/dashboard.scss +0 -0
  5. data/app/assets/stylesheets/phcdevworks_members/member/listings.scss +0 -3
  6. data/app/assets/stylesheets/phcdevworks_members/member/profiles.scss +0 -3
  7. data/app/controllers/phcdevworks_members/application_controller.rb +11 -11
  8. data/app/controllers/phcdevworks_members/{info → member}/dashboard_controller.rb +2 -2
  9. data/app/helpers/phcdevworks_members/{info → member}/dashboard_helper.rb +1 -1
  10. data/app/models/phcdevworks_members/directory/category.rb +1 -1
  11. data/app/views/layouts/phcdevworks_members/application.html.erb +59 -59
  12. data/app/views/layouts/phcdevworks_members/components/backend/footer/_footer.html.erb +7 -7
  13. data/app/views/layouts/phcdevworks_members/components/backend/navigation/_top_menu.html.erb +26 -26
  14. data/app/views/layouts/phcdevworks_members/components/backend/sidebars/_side_menu.html.erb +226 -225
  15. data/app/views/layouts/phcdevworks_members/member_profile.html.erb +59 -58
  16. data/app/views/phcdevworks_members/{info → member}/dashboard/index.html.erb +0 -0
  17. data/config/routes.rb +8 -8
  18. data/lib/phcdevworks_members/engine.rb +22 -22
  19. data/lib/phcdevworks_members/version.rb +1 -1
  20. metadata +13 -16
  21. data/app/assets/stylesheets/phcdevworks_members/info/dashboard.scss +0 -3
  22. data/app/views/layouts/phcdevworks_members/mailer.html.erb +0 -11
  23. data/app/views/layouts/phcdevworks_members/mailer.text.erb +0 -1
  24. data/app/views/phcdevworks_members/member/dashboards/index.html.erb +0 -54
  25. data/config/initializers/friendly_id.rb +0 -107
@@ -2,77 +2,78 @@
2
2
  <html>
3
3
  <head>
4
4
 
5
- <!-- SEO System -->
6
- <% phc_seo_title "Members by PHCDevworks" %>
7
- <% phc_seo_description "Application to Manage Member Information and Business Directory Listings " %>
8
- <!-- SEO System -->
9
-
10
- <!-- SEO and Site Description -->
11
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
12
- <title><%= yield(:phc_seo_title) %></title>
13
- <meta name="description" content="<%= yield(:phc_seo_description) %>">
14
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
15
- <link rel="canonical" href="http://phcdevworks.com">
16
- <!-- SEO and Site Description -->
17
-
18
- <!-- Rails Security Tags -->
19
- <%= csrf_meta_tags %>
20
- <%= csp_meta_tag %>
21
- <!-- Rails Security Tags -->
22
-
23
- <!-- CSS Styles -->
24
- <%= stylesheet_link_tag 'phcdevworks_members/application', media: 'all', 'data-turbolinks-track': 'reload' %>
25
- <!-- CSS Styles -->
26
-
27
- <!-- Font -->
28
- <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700"/>
29
- <!-- Font -->
5
+ <!-- SEO System -->
6
+ <% phc_seo_title "PHCDevworks Members" %>
7
+ <% phc_seo_description "Ruby on Rails 6 Engine for Members Organization and Member Directory Management." %>
8
+ <!-- SEO System -->
9
+
10
+ <!-- SEO and Site Description -->
11
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
12
+ <title><%= yield(:phc_seo_title) %></title>
13
+ <meta name="description" content="<%= yield(:phc_seo_description) %>">
14
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
15
+ <link rel="canonical" href="http://phcdevworks.com">
16
+ <!-- SEO and Site Description -->
17
+
18
+ <!-- Rails Security Tags -->
19
+ <%= csrf_meta_tags %>
20
+ <%= csp_meta_tag %>
21
+ <!-- Rails Security Tags -->
22
+
23
+ <!-- CSS Styles -->
24
+ <%= stylesheet_link_tag "phcdevworks_members/application", media: "all" %>
25
+ <!-- CSS Styles -->
26
+
27
+ <!-- Font -->
28
+ <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700"/>
29
+ <!-- Font -->
30
30
 
31
31
  </head>
32
32
  <body>
33
33
 
34
- <!-- Page Container -->
35
- <div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
34
+ <!-- Page Container -->
35
+ <div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
36
36
 
37
- <!-- Page Header -->
38
- <div id="header" class="header navbar-default">
39
- <%= render 'layouts/phcdevworks_members/components/backend/navigation/top_menu' %>
40
- </div>
41
- <!-- Page Header -->
37
+ <!-- Page Header -->
38
+ <div id="header" class="header navbar-default">
39
+ <%= render "layouts/phcdevworks_members/components/backend/navigation/top_menu" %>
40
+ </div>
41
+ <!-- Page Header -->
42
42
 
43
- <!-- Page Sidebar -->
44
- <div id="sidebar" class="sidebar">
45
- <%= render 'layouts/phcdevworks_members/components/backend/sidebars/side_menu' %>
46
- </div>
47
- <div class="sidebar-bg"></div>
48
- <!-- Page Sidebar -->
43
+ <!-- Page Sidebar -->
44
+ <div id="sidebar" class="sidebar">
45
+ <%= render "layouts/phcdevworks_members/components/backend/sidebars/side_menu" %>
46
+ </div>
47
+ <div class="sidebar-bg"></div>
48
+ <!-- Page Sidebar -->
49
49
 
50
- <!-- Page Content -->
51
- <div id="content" class="content content-full-width">
52
- <%= yield %>
53
- </div>
54
- <!-- Page Content -->
50
+ <!-- Page Content -->
51
+ <div id="content" class="content content-full-width">
52
+ <%= render "phcdevworks_notifications/bootstrap/notifications" %>
53
+ <%= yield %>
54
+ </div>
55
+ <!-- Page Content -->
55
56
 
56
- <!-- Footer Content -->
57
- <div id="footer" class="footer mb-4">
58
- <%= render 'layouts/phcdevworks_members/components/backend/footer/footer' %>
59
- </div>
60
- <!-- Footer Content -->
57
+ <!-- Footer Content -->
58
+ <div id="footer" class="row footer mb-4">
59
+ <%= render "layouts/phcdevworks_accounts/components/backend/footer/footer" %>
60
+ </div>
61
+ <!-- Footer Content -->
61
62
 
62
- </div>
63
- <!-- Page Container -->
63
+ </div>
64
+ <!-- Page Container -->
64
65
 
65
- <!-- JavaScript -->
66
- <%= javascript_include_tag "phcdevworks_members/application", 'data-turbolinks-track': 'reload' %>
67
- <!-- JavaScript -->
66
+ <!-- JavaScript -->
67
+ <%= javascript_include_tag "phcdevworks_members/application", "data-turbolinks-track": "reload" %>
68
+ <!-- JavaScript -->
68
69
 
69
- <!-- JavaScript Loader -->
70
- <script>
70
+ <!-- JavaScript Loader -->
71
+ <script>
71
72
  $(document).ready(function() {
72
- App.init();
73
+ App.init();
73
74
  });
74
- </script>
75
- <!-- JavaScript Loader -->
75
+ </script>
76
+ <!-- JavaScript Loader -->
76
77
 
77
78
  </body>
78
79
  </html>
data/config/routes.rb CHANGED
@@ -2,7 +2,7 @@ PhcdevworksMembers::Engine.routes.draw do
2
2
 
3
3
  # Dashboard Routes
4
4
  get 'dashboard', to: 'info/dashboard#index'
5
-
5
+
6
6
  # Member Routes
7
7
  namespace :member do
8
8
  resources :profiles, class_name: 'Member::Profile' do
@@ -10,22 +10,22 @@ PhcdevworksMembers::Engine.routes.draw do
10
10
  resources :addresses, class_name: 'Member::Address'
11
11
  end
12
12
  end
13
-
13
+
14
14
  # Directory Routes
15
15
  namespace :directory do
16
16
  resources :categories, class_name: 'Directory::Category'
17
17
  end
18
-
18
+
19
19
  # API Routes
20
20
  namespace :api, :path => "", :constraints => {:subdomain => "api"} do
21
21
  namespace :v1 do
22
- resources :categories, defaults: {format: 'json'} do
23
- resources :listings, defaults: {format: 'json'}
24
- end
22
+ resources :categories, defaults: {format: 'json'} do
23
+ resources :listings, defaults: {format: 'json'}
24
+ end
25
25
  end
26
26
  end
27
-
27
+
28
28
  # Mount Routes
29
29
  mount PhcdevworksAccounts::Engine, :at => '/'
30
-
30
+
31
31
  end
@@ -1,31 +1,31 @@
1
1
  module PhcdevworksMembers
2
- class Engine < ::Rails::Engine
2
+ class Engine < ::Rails::Engine
3
3
 
4
- # Load Main Dependencies
5
- require "jbuilder"
6
- require "paper_trail"
7
- require "friendly_id"
4
+ # Load Main Dependencies
5
+ require "jbuilder"
6
+ require "paper_trail"
7
+ require "friendly_id"
8
8
 
9
- # Load Theme Dependencies
10
- require "phcthemes_admin_panel_pack"
11
- require "phcthemes_web_theme_pack"
9
+ # Load Theme Dependencies
10
+ require "phcthemes_admin_panel_pack"
11
+ require "phcthemes_web_theme_pack"
12
12
 
13
- # Load Helper Dependencies
14
- require "phcdevworks_core"
15
- require "phcdevworks_active_menus"
16
- require "phcdevworks_notifications"
17
- require "phcdevworks_titleseo"
13
+ # Load Helper Dependencies
14
+ require "phcdevworks_core"
15
+ require "phcdevworks_active_menus"
16
+ require "phcdevworks_notifications"
17
+ require "phcdevworks_titleseo"
18
18
 
19
- # Load Upload Dependencies
20
- require "aws-sdk-s3"
21
- require "google-cloud-storage"
22
- require "mini_magick"
19
+ # Load Upload Dependencies
20
+ require "aws-sdk-s3"
21
+ require "google-cloud-storage"
22
+ require "mini_magick"
23
23
 
24
- # Load User Accounts
25
- require "phcdevworks_accounts"
24
+ # Load User Accounts
25
+ require "phcdevworks_accounts"
26
26
 
27
- # Engine Namespace
28
- isolate_namespace PhcdevworksMembers
27
+ # Engine Namespace
28
+ isolate_namespace PhcdevworksMembers
29
29
 
30
- end
30
+ end
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksMembers
2
- VERSION = '2.2.1'
2
+ VERSION = '2.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_members
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-09 00:00:00.000000000 Z
11
+ date: 2019-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -212,14 +212,14 @@ dependencies:
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: 1.2.0
215
+ version: 1.3.0
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: 1.2.0
222
+ version: 1.3.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: sqlite3
225
225
  requirement: !ruby/object:Gem::Requirement
@@ -234,9 +234,10 @@ dependencies:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: '1.4'
237
- description: Ruby on Rails 6 for members organization and member directory management.
237
+ description: Ruby on Rails 6 Engine for Members Organization and Member Directory
238
+ Management.
238
239
  email:
239
- - developers@phcdevworks.com
240
+ - info@phcdevworks.com
240
241
  executables: []
241
242
  extensions: []
242
243
  extra_rdoc_files: []
@@ -253,22 +254,22 @@ files:
253
254
  - app/assets/javascripts/phcdevworks_members/member/profiles.coffee
254
255
  - app/assets/stylesheets/phcdevworks_members/application.scss
255
256
  - app/assets/stylesheets/phcdevworks_members/directory/categories.scss
256
- - app/assets/stylesheets/phcdevworks_members/info/dashboard.scss
257
257
  - app/assets/stylesheets/phcdevworks_members/member/addresses.scss
258
+ - app/assets/stylesheets/phcdevworks_members/member/dashboard.scss
258
259
  - app/assets/stylesheets/phcdevworks_members/member/listings.scss
259
260
  - app/assets/stylesheets/phcdevworks_members/member/profiles.scss
260
261
  - app/controllers/phcdevworks_members/api/v1/categories_controller.rb
261
262
  - app/controllers/phcdevworks_members/api/v1/listings_controller.rb
262
263
  - app/controllers/phcdevworks_members/application_controller.rb
263
264
  - app/controllers/phcdevworks_members/directory/categories_controller.rb
264
- - app/controllers/phcdevworks_members/info/dashboard_controller.rb
265
265
  - app/controllers/phcdevworks_members/member/addresses_controller.rb
266
+ - app/controllers/phcdevworks_members/member/dashboard_controller.rb
266
267
  - app/controllers/phcdevworks_members/member/listings_controller.rb
267
268
  - app/controllers/phcdevworks_members/member/profiles_controller.rb
268
269
  - app/helpers/phcdevworks_members/application_helper.rb
269
270
  - app/helpers/phcdevworks_members/directory/categories_helper.rb
270
- - app/helpers/phcdevworks_members/info/dashboard_helper.rb
271
271
  - app/helpers/phcdevworks_members/member/addresses_helper.rb
272
+ - app/helpers/phcdevworks_members/member/dashboard_helper.rb
272
273
  - app/helpers/phcdevworks_members/member/listings_helper.rb
273
274
  - app/helpers/phcdevworks_members/member/profiles_helper.rb
274
275
  - app/jobs/phcdevworks_members/application_job.rb
@@ -288,8 +289,6 @@ files:
288
289
  - app/views/layouts/phcdevworks_members/components/backend/footer/_footer.html.erb
289
290
  - app/views/layouts/phcdevworks_members/components/backend/navigation/_top_menu.html.erb
290
291
  - app/views/layouts/phcdevworks_members/components/backend/sidebars/_side_menu.html.erb
291
- - app/views/layouts/phcdevworks_members/mailer.html.erb
292
- - app/views/layouts/phcdevworks_members/mailer.text.erb
293
292
  - app/views/layouts/phcdevworks_members/member_profile.html.erb
294
293
  - app/views/phcdevworks_members/api/v1/categories/index.json.rabl
295
294
  - app/views/phcdevworks_members/api/v1/listings/index.json.rabl
@@ -302,7 +301,6 @@ files:
302
301
  - app/views/phcdevworks_members/directory/categories/index.html.erb
303
302
  - app/views/phcdevworks_members/directory/categories/new.html.erb
304
303
  - app/views/phcdevworks_members/directory/categories/show.html.erb
305
- - app/views/phcdevworks_members/info/dashboard/index.html.erb
306
304
  - app/views/phcdevworks_members/member/addresses/_form.html.erb
307
305
  - app/views/phcdevworks_members/member/addresses/components/_address_audits_table.html.erb
308
306
  - app/views/phcdevworks_members/member/addresses/components/_address_main.html.erb
@@ -310,7 +308,7 @@ files:
310
308
  - app/views/phcdevworks_members/member/addresses/index.html.erb
311
309
  - app/views/phcdevworks_members/member/addresses/new.html.erb
312
310
  - app/views/phcdevworks_members/member/addresses/show.html.erb
313
- - app/views/phcdevworks_members/member/dashboards/index.html.erb
311
+ - app/views/phcdevworks_members/member/dashboard/index.html.erb
314
312
  - app/views/phcdevworks_members/member/listings/_form.html.erb
315
313
  - app/views/phcdevworks_members/member/listings/components/_listing_audits_table.html.erb
316
314
  - app/views/phcdevworks_members/member/listings/components/_listing_main.html.erb
@@ -328,7 +326,6 @@ files:
328
326
  - app/views/phcdevworks_members/member/profiles/index.html.erb
329
327
  - app/views/phcdevworks_members/member/profiles/new.html.erb
330
328
  - app/views/phcdevworks_members/member/profiles/show.html.erb
331
- - config/initializers/friendly_id.rb
332
329
  - config/routes.rb
333
330
  - db/migrate/20170517064030_create_phcdevworks_members_profile_versions.rb
334
331
  - db/migrate/20170517064049_create_phcdevworks_members_listing_versions.rb
@@ -362,8 +359,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
362
359
  - !ruby/object:Gem::Version
363
360
  version: '0'
364
361
  requirements: []
365
- rubygems_version: 3.0.4
362
+ rubygems_version: 3.0.6
366
363
  signing_key:
367
364
  specification_version: 4
368
- summary: Rails 6 Members Engine
365
+ summary: Rails 6 - Engine - Members
369
366
  test_files: []
@@ -1,3 +0,0 @@
1
- // Place all the styles related to the info/dashboard controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -1,11 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <style>
6
- </style>
7
- </head>
8
- <body>
9
- <%= yield %>
10
- </body>
11
- </html>
@@ -1 +0,0 @@
1
- <%= yield %>
@@ -1,54 +0,0 @@
1
- <div class="row border-bottom white-bg dashboard-header">
2
- </div>
3
-
4
- <div class="row">
5
-
6
- <div class="col-lg-3 col-md-6">
7
- <div class="widget widget-stats bg-gradient-teal">
8
- <div class="stats-icon stats-icon-lg">
9
- <i class="fas fa-users fa-fw"></i>
10
- </div>
11
- <div class="stats-content">
12
- <div class="stats-title">Total <%= "Member".pluralize(2) %></div>
13
- <div class="stats-number"><%= @member_profile.count(:all) %></div>
14
- </div>
15
- </div>
16
- </div>
17
-
18
- <div class="col-lg-3 col-md-6">
19
- <div class="widget widget-stats bg-gradient-blue">
20
- <div class="stats-icon stats-icon-lg">
21
- <i class="fas fa-globe-asia fa-fw"></i>
22
- </div>
23
- <div class="stats-content">
24
- <div class="stats-title">Total <%= "Address".pluralize(2) %></div>
25
- <div class="stats-number"><%= @member_address.count(:all) %></div>
26
- </div>
27
- </div>
28
- </div>
29
-
30
- <div class="col-lg-3 col-md-6">
31
- <div class="widget widget-stats bg-gradient-purple">
32
- <div class="stats-icon stats-icon-lg">
33
- <i class="fas fa-address-card fa-fw"></i>
34
- </div>
35
- <div class="stats-content">
36
- <div class="stats-title">Total <%= "Listing".pluralize(2) %></div>
37
- <div class="stats-number"><%= @member_listing.count(:all) %></div>
38
- </div>
39
- </div>
40
- </div>
41
-
42
- <div class="col-lg-3 col-md-6">
43
- <div class="widget widget-stats bg-gradient-pink">
44
- <div class="stats-icon stats-icon-lg">
45
- <i class="fas fa-sitemap fa-fw"></i>
46
- </div>
47
- <div class="stats-content">
48
- <div class="stats-title">Total <%= "Category".pluralize(2) %></div>
49
- <div class="stats-number"><%= @directory_category.count(:all) %></div>
50
- </div>
51
- </div>
52
- </div>
53
-
54
- </div>
@@ -1,107 +0,0 @@
1
- # FriendlyId Global Configuration
2
- #
3
- # Use this to set up shared configuration options for your entire application.
4
- # Any of the configuration options shown here can also be applied to single
5
- # models by passing arguments to the `friendly_id` class method or defining
6
- # methods in your model.
7
- #
8
- # To learn more, check out the guide:
9
- #
10
- # http://norman.github.io/friendly_id/file.Guide.html
11
-
12
- FriendlyId.defaults do |config|
13
- # ## Reserved Words
14
- #
15
- # Some words could conflict with Rails's routes when used as slugs, or are
16
- # undesirable to allow as slugs. Edit this list as needed for your app.
17
- config.use :reserved
18
-
19
- config.reserved_words = %w(new edit index session login logout users admin
20
- stylesheets assets javascripts images)
21
-
22
- # This adds an option to treat reserved words as conflicts rather than exceptions.
23
- # When there is no good candidate, a UUID will be appended, matching the existing
24
- # conflict behavior.
25
-
26
- # config.treat_reserved_as_conflict = true
27
-
28
- # ## Friendly Finders
29
- #
30
- # Uncomment this to use friendly finders in all models. By default, if
31
- # you wish to find a record by its friendly id, you must do:
32
- #
33
- # MyModel.friendly.find('foo')
34
- #
35
- # If you uncomment this, you can do:
36
- #
37
- # MyModel.find('foo')
38
- #
39
- # This is significantly more convenient but may not be appropriate for
40
- # all applications, so you must explicity opt-in to this behavior. You can
41
- # always also configure it on a per-model basis if you prefer.
42
- #
43
- # Something else to consider is that using the :finders addon boosts
44
- # performance because it will avoid Rails-internal code that makes runtime
45
- # calls to `Module.extend`.
46
- #
47
- config.use :finders
48
- #
49
- # ## Slugs
50
- #
51
- # Most applications will use the :slugged module everywhere. If you wish
52
- # to do so, uncomment the following line.
53
- #
54
- config.use :slugged
55
- #
56
- # By default, FriendlyId's :slugged addon expects the slug column to be named
57
- # 'slug', but you can change it if you wish.
58
- #
59
- config.slug_column = 'slug'
60
- #
61
- # By default, slug has no size limit, but you can change it if you wish.
62
- #
63
- # config.slug_limit = 255
64
- #
65
- # When FriendlyId can not generate a unique ID from your base method, it appends
66
- # a UUID, separated by a single dash. You can configure the character used as the
67
- # separator. If you're upgrading from FriendlyId 4, you may wish to replace this
68
- # with two dashes.
69
- #
70
- # config.sequence_separator = '-'
71
- #
72
- # Note that you must use the :slugged addon **prior** to the line which
73
- # configures the sequence separator, or else FriendlyId will raise an undefined
74
- # method error.
75
- #
76
- # ## Tips and Tricks
77
- #
78
- # ### Controlling when slugs are generated
79
- #
80
- # As of FriendlyId 5.0, new slugs are generated only when the slug field is
81
- # nil, but if you're using a column as your base method can change this
82
- # behavior by overriding the `should_generate_new_friendly_id?` method that
83
- # FriendlyId adds to your model. The change below makes FriendlyId 5.0 behave
84
- # more like 4.0.
85
- # Note: Use(include) Slugged module in the config if using the anonymous module.
86
- # If you have `friendly_id :name, use: slugged` in the model, Slugged module
87
- # is included after the anonymous module defined in the initializer, so it
88
- # overrides the `should_generate_new_friendly_id?` method from the anonymous module.
89
- #
90
- # config.use :slugged
91
- # config.use Module.new {
92
- # def should_generate_new_friendly_id?
93
- # slug.blank? || <your_column_name_here>_changed?
94
- # end
95
- # }
96
- #
97
- # FriendlyId uses Rails's `parameterize` method to generate slugs, but for
98
- # languages that don't use the Roman alphabet, that's not usually sufficient.
99
- # Here we use the Babosa library to transliterate Russian Cyrillic slugs to
100
- # ASCII. If you use this, don't forget to add "babosa" to your Gemfile.
101
- #
102
- # config.use Module.new {
103
- # def normalize_friendly_id(text)
104
- # text.to_slug.normalize! :transliterations => [:russian, :latin]
105
- # end
106
- # }
107
- end