README.md in htmltoword-0.7.0 vs README.md in htmltoword-1.0.0
- old
+ new
@@ -59,19 +59,19 @@
# filename and word_template are optional. By default it will name the file as your action and use the default template provided by the gem. The use of the .docx in the filename and word_template is optional.
def my_action
# ...
respond_with(@object, filename: 'my_file.docx', word_template: 'my_template.docx')
# Alternatively, if you don't want to create the .docx.erb template you could
- respond_with(@object, content: '<html><body>some html</body></html>', filename: 'my_file.docx')
+ respond_with(@object, content: '<html><head></head><body><p>Hello</p></body></html>', filename: 'my_file.docx')
end
def my_action2
# ...
respond_to do |format|
format.docx do
render docx: 'my_view', filename: 'my_file.docx'
# Alternatively, if you don't want to create the .docx.erb template you could
- render docx: 'my_file.docx', content: '<html><body>some html</body></html>'
+ render docx: 'my_file.docx', content: '<html><head></head><body><p>Hello</p></body></html>'
end
end
end
```