phcdevworks_active_menus 2.2.4 → 3.0.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: 67c0a444b176af60e72d8c2315b4bc4fe258a2a23977ddd08220005a24d5e915
4
- data.tar.gz: 5f24af064881963d01026b59dc2caf019b0d7dae15a6c05bacfd23dbf961d7e3
3
+ metadata.gz: 41f33f743e7be3cd034bccc638878a31e95b4d6f35cefc7131d68f4ea49758f2
4
+ data.tar.gz: cdadbb3feebcb06e2c5cb2cb38038e0e80d2fb57a970f08f8eb59735507e5e6f
5
5
  SHA512:
6
- metadata.gz: 9039963d6afa904ee0f0059d725fc410800b8ff30f710c1b91e8e392f411e3cae961aaea20d81c80be65fd3fa3fbb0ff689808f0390cd9b1c5c4dda1c907b137
7
- data.tar.gz: f59f23838ae67ee8a7946b9a5eb3894211b9d6f6df8be0bc1e8f4a3960e545dffaebba9b38add22697e6c51e80b2679edbfa9364cf16499ee54f19e15a3a7a9e
6
+ metadata.gz: d44d1baf56b00e61949a8755cef20d0629adfe8e48c96c50c5dc0f7abc8e4bd17911ec54fce7d007fd60ed7b9dde6ded296f43d9c79b04df8f18db98e628fb07
7
+ data.tar.gz: c166ede1fb4204fd064fe270f82a1dd3d010051da6cf251a4c4601f60ae694507888580ad2e1891ff836d5515bda4ae2c2a37233839912439fdec48e1e5a76b6
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2021 PHCDevworks
1
+ Copyright 2022 PHCDevworks
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,31 +1,37 @@
1
- ### PHCDevworks Active Menus for Rails 6 (Add Active Class to Menus)
2
- PHCDevworks Active Menus Rails 6 engine with helpers to add active class to menus.
3
-
4
- * Add active class based on current controller.
5
- * Add active class based on current action.
6
- * Add active class based on both current controller plus current action.
7
-
8
- #### Step 1 - Add PHCDevworks Active Menus to your gemfile
9
-
10
- gem 'phcdevworks_active_menus'
11
- bundle install
12
-
13
- #### Step 2 - Load Helpers in the Application's Controller
14
- Add the line of code below into your app/controllers/application_controller.rb (application's controller file).
15
-
16
- helper PhcdevworksActiveMenus::Engine.helpers
17
-
18
- #### How to Add Active Class Based on Controller Only (Often used for main menu items with sub-menus.)
19
- Add the line of code in between div class tag.
20
-
21
- <div class"<%= phc_menu_active_controller("ExampleControllerName") %>">
22
-
23
- #### How to Add Active Class Based on Action Only (Often used for submenu items.)
24
- Add the line of code in between div class tag.
25
-
26
- <div class"<%= phc_menu_active_action("ExampleActionName") %>">
27
-
28
- #### How to Add Active Class Based on Controller and Action (Used if you need to get specific.)
29
- Add the line of code in between div class tag.
30
-
31
- <div class"<%= phc_menu_active_action_controller("ExampleControllerName", "ExampleActionName") %>">
1
+ ### PHCDevworks Active Menus for Rails 7 (Add Active Class to Menus)
2
+
3
+ PHCDevworks Active Menus Rails 7 engine with helpers to add active class to menus.
4
+
5
+ * Add active class based on current controller.
6
+ * Add active class based on current action.
7
+ * Add active class based on both current controller plus current action.
8
+
9
+ #### Step 1 - Add PHCDevworks Active Menus to your gemfile
10
+
11
+ gem 'phcdevworks_active_menus'
12
+ bundle install
13
+
14
+ #### Step 2 - Load Helpers in the Application's Controller
15
+ Add the line of code below into your app/controllers/application_controller.rb (application's controller file).
16
+
17
+ helper PhcdevworksActiveMenus::Engine.helpers
18
+
19
+ #### How to Add Active Class Based on Controller Only (Often used for main menu items with sub-menus.)
20
+ Add the line of code in between div class tag.
21
+
22
+ <div class"<%= phc_menu_active_controller("ExampleControllerName") %>">
23
+
24
+ #### How to Add Active Class Based on Action Only (Often used for submenu items.)
25
+ Add the line of code in between div class tag.
26
+
27
+ <div class"<%= phc_menu_active_action("ExampleActionName") %>">
28
+
29
+ #### How to Add Active Class Based on Controller and Action (Used if you need to get specific.)
30
+ Add the line of code in between div class tag.
31
+
32
+ <div class"<%= phc_menu_active_action_controller("ExampleControllerName", "ExampleActionName") %>">
33
+
34
+ ### Status
35
+
36
+ [![Gem Version](https://badge.fury.io/rb/phcdevworks_active_menus.svg)](https://badge.fury.io/rb/phcdevworks_active_menus) [![Publish to Github.com](https://github.com/phcdevworks/phcdevworks_active_menus/actions/workflows/publish_gem_github_com.yml/badge.svg)](https://github.com/phcdevworks/phcdevworks_active_menus/actions/workflows/publish_gem_github_com.yml) [![Publish to Rubygems.org](https://github.com/phcdevworks/phcdevworks_active_menus/actions/workflows/publish_gem_rubygems_org.yml/badge.svg)](https://github.com/phcdevworks/phcdevworks_active_menus/actions/workflows/publish_gem_rubygems_org.yml)
37
+
@@ -1,20 +1,20 @@
1
- module PhcdevworksActiveMenus
2
- module ApplicationHelper
3
-
4
- # Add Active to Menu Based on Controller Name
5
- def phc_menu_active_controller(controller_name)
6
- params[:controller] == controller_name ? "active" : nil
7
- end
8
-
9
- # Add Active to Menu Based on Controller Name
10
- def phc_menu_active_action(action_name)
11
- params[:action] == action_name ? "active" : nil
12
- end
13
-
14
- # Add Active to Menu Based on Both Controller Name and Action
15
- def phc_menu_active_action_controller(controller_name, action_name)
16
- params[:controller] == controller_name && params[:action] == action_name ? "active" : nil
17
- end
18
-
19
- end
20
- end
1
+ module PhcdevworksActiveMenus
2
+ module ApplicationHelper
3
+
4
+ # Add Active to Menu Based on Controller Name
5
+ def phc_menu_active_controller(controller_name)
6
+ params[:controller] == controller_name ? "active" : nil
7
+ end
8
+
9
+ # Add Active to Menu Based on Controller Name
10
+ def phc_menu_active_action(action_name)
11
+ params[:action] == action_name ? "active" : nil
12
+ end
13
+
14
+ # Add Active to Menu Based on Both Controller Name and Action
15
+ def phc_menu_active_action_controller(controller_name, action_name)
16
+ params[:controller] == controller_name && params[:action] == action_name ? "active" : nil
17
+ end
18
+
19
+ end
20
+ end
@@ -1,6 +1,6 @@
1
1
  module PhcdevworksActiveMenus
2
2
  class Engine < ::Rails::Engine
3
-
3
+
4
4
  # Theme Dependencies
5
5
  require "phcthemes_admin_panel_pack"
6
6
  require "phcthemes_web_theme_pack"
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksActiveMenus
2
- VERSION = '2.2.4'
2
+ VERSION = "3.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_active_menus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-07 00:00:00.000000000 Z
11
+ date: 2022-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.1'
19
+ version: '7.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '6.1'
26
+ version: '7.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: phcthemes_admin_panel_pack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
33
+ version: '5.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4.0'
40
+ version: '5.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: phcthemes_web_theme_pack
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '4.0'
47
+ version: '5.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '4.0'
54
+ version: '5.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,8 +66,8 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.4'
69
- description: Rails helpers to add active class to menu items based on controller and
70
- controller action.
69
+ description: Rails 7 helpers to add active class to menu items based on controller
70
+ and controller action.
71
71
  email:
72
72
  - imfo@phcdevworks.com
73
73
  executables: []
@@ -86,7 +86,6 @@ homepage: https://phcdevworks.com/
86
86
  licenses:
87
87
  - MIT
88
88
  metadata:
89
- allowed_push_host: https://rubygems.org/
90
89
  homepage_uri: https://phcdevworks.com/
91
90
  source_code_uri: https://github.com/phcdevworks/phcdevworks_active_menus
92
91
  changelog_uri: https://github.com/phcdevworks/phcdevworks_active_menus/releases
@@ -105,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
104
  - !ruby/object:Gem::Version
106
105
  version: '0'
107
106
  requirements: []
108
- rubygems_version: 3.0.3
107
+ rubygems_version: 3.0.3.1
109
108
  signing_key:
110
109
  specification_version: 4
111
110
  summary: PHCDevworks - Helpers - Active Menus