dismissible_blocks 2.0.3 → 2.0.4
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 +4 -4
- data/CHANGELOG.md +50 -0
- data/app/controllers/dismissible_blocks_controller.rb +3 -3
- data/dismissible_blocks.gemspec +1 -0
- data/lib/dismissible_blocks/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b64ca1604b11e5b80483bc77a3c255db6b35ece04ed19a5f78940f7a84edbaf
|
|
4
|
+
data.tar.gz: 60e1836d4f1748e1be8555f44716c97da442b28568a3bbfb6bc97b0e6b421708
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58bce889812976d053a8508f752f03f405c61266bc5e2e983edbcd69d1fbd66061848fcc89b0c8c723a58a3fa2c30827508e787a4a7a31d8ff4f5befd7b5be43
|
|
7
|
+
data.tar.gz: d9af2e3409f43faa64e304092d910fbd5871cd08712a75de2757403aa158312c2c52fec30f182ab9e067dad4d6f99be8c93a0562e12aa75f42f75d570fb7e6a5
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## [2.0.4] - 2018-05-30
|
|
5
|
+
- Fix DismissibleBlocksController#current_user_available?
|
|
6
|
+
|
|
7
|
+
## [2.0.3] - 2018-03-31
|
|
8
|
+
- Add metadata for [RubyGems.org](https://rubygems.org/).
|
|
9
|
+
- Add CHANGELOG.
|
|
10
|
+
|
|
11
|
+
## [2.0.2] - 2018-03-20
|
|
12
|
+
- Fix JavaScript when "hide" button does not exist.
|
|
13
|
+
|
|
14
|
+
## [2.0.1] - 2018-03-20
|
|
15
|
+
- Refactor JavaScript for older browsers (IE11).
|
|
16
|
+
|
|
17
|
+
## [2.0.0] - 2018-03-14
|
|
18
|
+
- Remove jQuery dependency.
|
|
19
|
+
- Prevent dismissed block from being saved multiple times.
|
|
20
|
+
|
|
21
|
+
## [1.2.0] - 2018-03-11
|
|
22
|
+
- Update gem + tests to Rails 5.1.
|
|
23
|
+
|
|
24
|
+
## [1.1.1] - 2015-02-26
|
|
25
|
+
- Don't change `data-*` attributes with existing values.
|
|
26
|
+
|
|
27
|
+
## [1.1.0] - 2014-12-22
|
|
28
|
+
- Explicitly load `render_dismissible_block` helper method.
|
|
29
|
+
- Add `dismissible_blocks_controller?` helper method.
|
|
30
|
+
- Update documentation.
|
|
31
|
+
|
|
32
|
+
## [0.0.2] - 2014-03-05
|
|
33
|
+
- Update `dismissible_blocks.gemspec`.
|
|
34
|
+
|
|
35
|
+
## 0.0.1 - 2014-03-04
|
|
36
|
+
- Initial release.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
[2.0.3]: https://github.com/pbougie/dismissible_blocks/compare/v2.0.2...v2.0.3
|
|
40
|
+
[2.0.2]: https://github.com/pbougie/dismissible_blocks/compare/v2.0.1...v2.0.2
|
|
41
|
+
[2.0.1]: https://github.com/pbougie/dismissible_blocks/compare/v2.0.0...v2.0.1
|
|
42
|
+
[2.0.0]: https://github.com/pbougie/dismissible_blocks/compare/v1.2.0...v2.0.0
|
|
43
|
+
[1.2.0]: https://github.com/pbougie/dismissible_blocks/compare/v1.1.1...v1.2.0
|
|
44
|
+
[1.1.1]: https://github.com/pbougie/dismissible_blocks/compare/v1.1.0...v1.1.1
|
|
45
|
+
[1.1.0]: https://github.com/pbougie/dismissible_blocks/compare/v0.0.2...v1.1.0
|
|
46
|
+
[0.0.2]: https://github.com/pbougie/dismissible_blocks/compare/v0.0.1...v0.0.2
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
DismissibleBlocks © 2014 [Patrick Bougie](http://patrickbougie.com/).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class DismissibleBlocksController < ApplicationController
|
|
2
2
|
def create
|
|
3
|
-
if current_user_available
|
|
3
|
+
if current_user_available?
|
|
4
4
|
unless current_user.dismissed_blocks.include?(block)
|
|
5
5
|
current_user.dismissed_blocks.push(block)
|
|
6
6
|
current_user.save!
|
|
@@ -13,8 +13,8 @@ class DismissibleBlocksController < ApplicationController
|
|
|
13
13
|
|
|
14
14
|
private
|
|
15
15
|
|
|
16
|
-
def current_user_available
|
|
17
|
-
|
|
16
|
+
def current_user_available?
|
|
17
|
+
current_user && current_user.try(:dismissed_blocks)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def block
|
data/dismissible_blocks.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dismissible_blocks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Patrick Bougie
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-05-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -130,6 +130,7 @@ executables: []
|
|
|
130
130
|
extensions: []
|
|
131
131
|
extra_rdoc_files: []
|
|
132
132
|
files:
|
|
133
|
+
- CHANGELOG.md
|
|
133
134
|
- LICENSE.txt
|
|
134
135
|
- README.md
|
|
135
136
|
- app/assets/javascripts/dismissible_blocks.js
|
|
@@ -166,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
166
167
|
version: '0'
|
|
167
168
|
requirements: []
|
|
168
169
|
rubyforge_project:
|
|
169
|
-
rubygems_version: 2.7.
|
|
170
|
+
rubygems_version: 2.7.7
|
|
170
171
|
signing_key:
|
|
171
172
|
specification_version: 4
|
|
172
173
|
summary: Dismissible HTML blocks for Ruby on Rails
|