view_id 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c2f76003064622ae877e393fc1bfb5a3176d7c3
4
- data.tar.gz: cbbe8ff54739f219cf39a1c59d80a847286dff48
3
+ metadata.gz: '08e6af8219983748b2532bdcc71c42fe1ddc13d5'
4
+ data.tar.gz: '08a6ac591a180a186c3e879f44b8294104c518df'
5
5
  SHA512:
6
- metadata.gz: 4a3c195a76dddc5ae39c90c9d5c1deeb16a6d9e8e25830cd527de35d8919d146ec5baa5ed3aaed03194ccc38aef3fe9f6590ea11e88952794f70388f6d745fc3
7
- data.tar.gz: 7fabd0f4d1f7a807af69c3d07657f6117f384b345c97c60e8f4966f051b1e137a40aa93c31a3426479ff51c5a4b9b4bc13e9c1f1ff68c00f63101988c9579873
6
+ metadata.gz: f306b6edfd362863f4cfcd3e8189366cca97fbd8e7c586d6217f2936682faa7454448a9c08f5bc4ffcd2f7035c425b5b2612d561a575bdb3ab63187865cb7f1b
7
+ data.tar.gz: 6c572080913b7fdc9da96defce265eaa61ce4bd5587383d13f160177fd81a5bb958defe1f0944bc9ab9db0710a5d08c486318d0599d171191c40ad6130377a8d
data/README.md CHANGED
@@ -1,8 +1,26 @@
1
- # ViewId
2
- Short description and motivation.
1
+ # view_id
2
+
3
+ Identifier your view from controller and action.
3
4
 
4
5
  ## Usage
5
- How to use my plugin.
6
+
7
+ Use view_id method your controller or view.
8
+
9
+ ```
10
+ class PostsController < ApplicationController
11
+ def index
12
+ view_id #=> "post--index"
13
+ end
14
+ end
15
+ ```
16
+
17
+ ```
18
+ class Admin::DeletedPostsController < AdminController
19
+ def show
20
+ view_id #=> "admin-deleted_posts--show"
21
+ end
22
+ end
23
+ ```
6
24
 
7
25
  ## Installation
8
26
  Add this line to your application's Gemfile:
@@ -16,13 +34,5 @@ And then execute:
16
34
  $ bundle
17
35
  ```
18
36
 
19
- Or install it yourself as:
20
- ```bash
21
- $ gem install view_id
22
- ```
23
-
24
- ## Contributing
25
- Contribution directions go here.
26
-
27
37
  ## License
28
38
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -5,7 +5,7 @@ module ViewId
5
5
  end
6
6
 
7
7
  def view_identifier(controller_name, action_name)
8
- "#{controller_name.gsub(/::/, "--")}-#{action_name}"
8
+ "#{controller_name.gsub(/::/, "-")}--#{action_name}"
9
9
  end
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module ViewId
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaki Komagata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-21 00:00:00.000000000 Z
11
+ date: 2017-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails