see_more 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +29 -2
- data/lib/see_more/version.rb +1 -1
- data/see_more.gemspec +2 -0
- data/spec/see_more_spec.rb +4 -0
- data/spec/spec_helper.rb +8 -0
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjlhMWExNTg0NGEwNzI4MWQ0ZmQzMjVlZjhlZTBjNzI4ZGI4NjY0MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWVjNDI0NmJmOTIyN2JiOWY2NzY3OTQwZTI0M2M2OWI0NTRlYzY3NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2UwMDQxNTUxZGZjZWI0NDYwMDE4NzM2MWQ0MjM4MzJjNDE0ODM4MzQ4MjFh
|
10
|
+
Njc1OGU2MjYwYzY3N2ZlNDM5YTJiMTk3YjMyY2FhOWY4NGU1M2JlOGNmMjVi
|
11
|
+
NjUyZWE3MTRjOTNlNmE1Y2Y2NGI1ZWI2ZDFmZjQxM2NjOTQwMTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWJkMTA3Njk1MTI4MWFiOTM1OTlmYjhiZTUyYTJkOTkzZGFiYmI5YzE3ZjUw
|
14
|
+
OWU3MzA4MWExZjUyYzM4ODAyNzk1NzljYzdhMGNkMjM3YWE0MDZmMDliYWZj
|
15
|
+
NTQ5YmUxMWMyMGQ4ZWE1MjgwZjY3MTEyYzJhNjZhYWMzN2RjM2I=
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# SeeMore
|
2
2
|
|
3
|
-
|
3
|
+
**see_more** gem is pretty straight forward in truncating and displaying any large text in a small space with a "see more" link in the end. If clicked, this link shows the entire text and the "see more" link automatically toggles to "see less" link. That's all.
|
4
|
+
|
5
|
+
Also, this assumes that the server has standard defined REST methods.
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -18,7 +20,32 @@ Or install it yourself as:
|
|
18
20
|
|
19
21
|
## Usage
|
20
22
|
|
21
|
-
|
23
|
+
To display the description of a product with see_more, you would do this.
|
24
|
+
|
25
|
+
In your application.js,
|
26
|
+
|
27
|
+
//= require see_more
|
28
|
+
|
29
|
+
In your view(ideally show.html.erb)
|
30
|
+
|
31
|
+
<%= see_more @product,:desc, {db: true,link_classes: "clickable",classes: "light",content_size: 30} %>
|
32
|
+
|
33
|
+
###see_more
|
34
|
+
|
35
|
+
Params:
|
36
|
+
|
37
|
+
- **object** (Mandatory): The Object parameter represents the object itself(the active record object).
|
38
|
+
- **field** (Mandatory): The field (passed as symbol) is the attribute of the Object you are going to display as large text.
|
39
|
+
|
40
|
+
|
41
|
+
Options:
|
42
|
+
|
43
|
+
- **:classes** Displaying of text is inside a span with a class="see_more_span". You can add more classes through this option.
|
44
|
+
- **:link_classes**: You can add more classes to the "see more" link.
|
45
|
+
- **:content_size**: The number of characters to be displayed intially with the "see more" link.
|
46
|
+
- **:db**: Value can either be "true" or "false". If its true, only when you click on the link, the entire text is fetched from the db, if its false, even before clicking on the link, the entire text is rendered, it just hides/unhides the content.
|
47
|
+
- **:path**: If you want to visit a custom link, instead of a REST method, pass the url in this option.
|
48
|
+
|
22
49
|
|
23
50
|
## Contributing
|
24
51
|
|
data/lib/see_more/version.rb
CHANGED
data/see_more.gemspec
CHANGED
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: see_more
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- beck03076
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: ! ' This is Toggleable '
|
42
56
|
email:
|
43
57
|
- senthilkumar.hce@gmail.com
|
@@ -56,6 +70,8 @@ files:
|
|
56
70
|
- lib/see_more/helper.rb
|
57
71
|
- lib/see_more/version.rb
|
58
72
|
- see_more.gemspec
|
73
|
+
- spec/see_more_spec.rb
|
74
|
+
- spec/spec_helper.rb
|
59
75
|
homepage: ''
|
60
76
|
licenses: []
|
61
77
|
metadata: {}
|
@@ -79,5 +95,7 @@ rubygems_version: 2.2.2
|
|
79
95
|
signing_key:
|
80
96
|
specification_version: 4
|
81
97
|
summary: See more
|
82
|
-
test_files:
|
98
|
+
test_files:
|
99
|
+
- spec/see_more_spec.rb
|
100
|
+
- spec/spec_helper.rb
|
83
101
|
has_rdoc:
|