actionview-link_to_blank 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/actionview-link_to_blank.gemspec +5 -3
- data/lib/action_view/link_to_blank/link_to_blank.rb +24 -0
- data/lib/action_view/link_to_blank/railtie.rb +11 -0
- data/lib/action_view/link_to_blank/version.rb +5 -0
- data/lib/actionview-link_to_blank.rb +2 -0
- metadata +20 -4
- data/lib/actionview/link_to_blank.rb +0 -7
- data/lib/actionview/link_to_blank/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 882f89144dc2e878857d65ac92b50d38ca234072
|
4
|
+
data.tar.gz: 3700974c556b62a290bff69c8fd5a061dbbce275
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2299f2ee20a6a6f901f7ed8aabff6a2b002ac3d9d617f0435022969571598c16a1477ecb6d79a669811074b8a47c13dad4e8edcd4c793c48809c71fb3621385
|
7
|
+
data.tar.gz: 4332768310ecab9833f07ba114080efc482b54a59d6232f19c65b52a83033db84b1d4de70ade7d0268a61459a09ac0fe92bb36fbaa02c0107b6e0bfc1d6a7734
|
@@ -1,16 +1,16 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'action_view/link_to_blank/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "actionview-link_to_blank"
|
8
|
-
spec.version =
|
8
|
+
spec.version = ActionView::LinkToBlank::VERSION
|
9
9
|
spec.authors = ["sanemat"]
|
10
10
|
spec.email = ["o.gata.ken@gmail.com"]
|
11
11
|
spec.description = %q{Alias link_to with target _blank}
|
12
12
|
spec.summary = %q{Alias link_to with target _blank}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/sanemat/actionview-link_to_blank"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -20,4 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
22
|
spec.add_development_dependency "rake"
|
23
|
+
|
24
|
+
spec.add_dependency 'actionpack'
|
23
25
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module LinkToBlank
|
2
|
+
module ::ActionView
|
3
|
+
module Helpers
|
4
|
+
module UrlHelper
|
5
|
+
def link_to_blank(*args, &block)
|
6
|
+
if block_given?
|
7
|
+
options = args.first || {}
|
8
|
+
html_options = args.second || {}
|
9
|
+
link_to_blank(capture(&block), options, html_options)
|
10
|
+
else
|
11
|
+
name = args[0]
|
12
|
+
options = args[1] || {}
|
13
|
+
html_options = args[2] || {}
|
14
|
+
|
15
|
+
# override
|
16
|
+
html_options.merge!(target: '_blank')
|
17
|
+
|
18
|
+
link_to(name, options, html_options)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionview-link_to_blank
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sanemat
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: actionpack
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: Alias link_to with target _blank
|
42
56
|
email:
|
43
57
|
- o.gata.ken@gmail.com
|
@@ -51,9 +65,11 @@ files:
|
|
51
65
|
- README.md
|
52
66
|
- Rakefile
|
53
67
|
- actionview-link_to_blank.gemspec
|
54
|
-
- lib/
|
55
|
-
- lib/
|
56
|
-
|
68
|
+
- lib/action_view/link_to_blank/link_to_blank.rb
|
69
|
+
- lib/action_view/link_to_blank/railtie.rb
|
70
|
+
- lib/action_view/link_to_blank/version.rb
|
71
|
+
- lib/actionview-link_to_blank.rb
|
72
|
+
homepage: https://github.com/sanemat/actionview-link_to_blank
|
57
73
|
licenses:
|
58
74
|
- MIT
|
59
75
|
metadata: {}
|