phcdevworks_active_menus 2.2.4 → 2.3.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
  SHA256:
3
- metadata.gz: 67c0a444b176af60e72d8c2315b4bc4fe258a2a23977ddd08220005a24d5e915
4
- data.tar.gz: 5f24af064881963d01026b59dc2caf019b0d7dae15a6c05bacfd23dbf961d7e3
3
+ metadata.gz: 69dfa4d5554399d20bb1fe9f3fe2c27a8bcbe283557fb4a431dccd60d0b823f1
4
+ data.tar.gz: 53e5feef5d14514e0801d3b1bc42ecb4e81ebabee5e7173a216071e27099c732
5
5
  SHA512:
6
- metadata.gz: 9039963d6afa904ee0f0059d725fc410800b8ff30f710c1b91e8e392f411e3cae961aaea20d81c80be65fd3fa3fbb0ff689808f0390cd9b1c5c4dda1c907b137
7
- data.tar.gz: f59f23838ae67ee8a7946b9a5eb3894211b9d6f6df8be0bc1e8f4a3960e545dffaebba9b38add22697e6c51e80b2679edbfa9364cf16499ee54f19e15a3a7a9e
6
+ metadata.gz: 61ab8542e99813e58e7d3526722a715121b1d5d572f72a7c2a3ec652a93b0b71924a2ad2f98164e06cf2f60fe697302b575225d300e439790dfcb30d4fec6763
7
+ data.tar.gz: 8214db7f059fc315043d485c55811e7fc9608cce98dded69b335d0a4c5ab8c6d89315f76bd851f365754327f7ae7adb71c350706ce6111ca042ed3bc465204e6
data/MIT-LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright 2021 PHCDevworks
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright 2021 PHCDevworks
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,31 +1,33 @@
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 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") %>">
32
+
33
+ [![Gem Version](https://badge.fury.io/rb/phcdevworks_active_menus.svg)](https://badge.fury.io/rb/phcdevworks_active_menus)
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
- require "bundler/setup"
2
-
3
- APP_RAKEFILE = File.expand_path("spec/test_app/Rakefile", __dir__)
4
- load "rails/tasks/engine.rake"
5
-
6
- load "rails/tasks/statistics.rake"
7
-
8
- require "bundler/gem_tasks"
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("spec/test_app/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -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,12 +1,12 @@
1
- module PhcdevworksActiveMenus
2
- class Engine < ::Rails::Engine
3
-
4
- # Theme Dependencies
5
- require "phcthemes_admin_panel_pack"
6
- require "phcthemes_web_theme_pack"
7
-
8
- # Plugin Namespace
9
- isolate_namespace PhcdevworksActiveMenus
10
-
11
- end
12
- end
1
+ module PhcdevworksActiveMenus
2
+ class Engine < ::Rails::Engine
3
+
4
+ # Theme Dependencies
5
+ require "phcthemes_admin_panel_pack"
6
+ require "phcthemes_web_theme_pack"
7
+
8
+ # Plugin Namespace
9
+ isolate_namespace PhcdevworksActiveMenus
10
+
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
- module PhcdevworksActiveMenus
2
- VERSION = '2.2.4'
3
- end
1
+ module PhcdevworksActiveMenus
2
+ VERSION = '2.3.0'
3
+ end
@@ -1,6 +1,6 @@
1
- require "phcdevworks_active_menus/version"
2
- require "phcdevworks_active_menus/engine"
3
-
4
- module PhcdevworksActiveMenus
5
- # Your code goes here...
6
- end
1
+ require "phcdevworks_active_menus/version"
2
+ require "phcdevworks_active_menus/engine"
3
+
4
+ module PhcdevworksActiveMenus
5
+ # Your code goes here...
6
+ end
@@ -1,4 +1,4 @@
1
- # desc "Explaining what the task does"
2
- # task :phcdevworks_active_menus do
3
- # # Task goes here
4
- # end
1
+ # desc "Explaining what the task does"
2
+ # task :phcdevworks_active_menus do
3
+ # # Task goes here
4
+ # 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: 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: 2021-03-07 00:00:00.000000000 Z
11
+ date: 2021-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
33
+ version: '4.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: '4.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: '4.1'
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: '4.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
- rubygems_version: 3.0.3
108
+ rubygems_version: 3.2.22
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: PHCDevworks - Helpers - Active Menus