simple_text 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/models/document.rb +1 -1
- data/lib/simple_text/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f58e8225256e3ba1ff9930d2f2e406b790ee807
|
4
|
+
data.tar.gz: e4f125ffcf3e7dd5d7d3d090e3c2bcb7a2750eda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aa1c804670682844aff9bcf4c5b97fdfc159121248dc4593a3ae5740c22410bc03c1ce3b58b38d8d274c126d65e0eb380d0190e29cb1fa8ad3fcd97f91d271c
|
7
|
+
data.tar.gz: 55675cc887584f7314716af425a9c2dd9e75de3ef584094963df6f9ce199bd6bb14bab72607fb53fcf1e81d1b97666f71843caf5ebab35688fc7933ff227ec85
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ link_to 'Disclaimer', disclaimer_path
|
|
32
32
|
|
33
33
|
## Customizing the view
|
34
34
|
If you want different styling for your document, just overwrite the `documents/show` view in your application.
|
35
|
-
The contents of the document can be rendered by calling `
|
35
|
+
The contents of the document can be rendered by calling `to_html` on the document object.
|
36
36
|
|
37
37
|
## Overriding the default controller
|
38
38
|
For certain functionality, overriding the `DocumentsController` is required, e.g. to make [Pundit](https://github.com/elabs/pundit) work:
|
data/app/models/document.rb
CHANGED
@@ -3,7 +3,7 @@ class Document < ActiveRecord::Base
|
|
3
3
|
validates_length_of :title, minimum: 4, maximum: 100
|
4
4
|
|
5
5
|
|
6
|
-
def
|
6
|
+
def to_html
|
7
7
|
Redcarpet::Markdown.new(Redcarpet::Render::HTML.new, {tables: true, fenced_code_blocks: false, no_styles: true, escape_html: true}).render(contents)
|
8
8
|
end
|
9
9
|
end
|
data/lib/simple_text/version.rb
CHANGED