Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Fix textile in Interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
iboard committed Dec 13, 2011
1 parent 39043dd commit c8610ec
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/content_items/interpreter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def render(txt_template)
when :markdown
ContentItem::markdown(_text)
when :textile
view_context.sanitize(view_context.textilize(_text) )
view_context.sanitize(textilize(_text) )
when :simple_text
view_context.sanitize(view_context.simple_format(_text) )
else
Expand Down
1 change: 1 addition & 0 deletions public/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ <h1>Opps, 404 - Content not found</h1>
<div id='container_main'>
<div style='text-align: center; margin: 40px; background: #FCD284;
border: 1px solid #ddd; padding: 30px;
margin-top: 150px;
-moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px;
'>
Expand Down
1 change: 1 addition & 0 deletions public/422.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ <h1>OOPS - 422 - Changes rejected</h1>
<div id='container_main'>
<div style='text-align: center; margin: 40px; background: #FCD284;
border: 1px solid #ddd; padding: 30px;
margin-top: 150px;
-moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px;
'>
Expand Down
1 change: 1 addition & 0 deletions public/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ <h1>OOPS - 500 - Something went wrong</h1>
border: 1px solid #ddd; padding: 30px;
-moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px;
margin-top: 150px;
'>
<h1>Something went wrong.</h1>
<p>We're notified and will care about soon.</p>
Expand Down
9 changes: 9 additions & 0 deletions spec/requests/postings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@
page.should have_content "ATTACHMENT 0 NOT FOUND"
page.should have_content "ATTACHMENT 1 NOT FOUND"
end

it "should not produce a hickup with textile (Bugfix)" do
posting = @blog.postings.create(title: "This uses textile",
body: "Should render without 500", user_id: User.first.id, interpreter: :textile,
is_draft: false)
visit posting_path(posting)
page.should have_content "This uses textile"
page.should have_content "Should render without 500"
end

end

Expand Down

0 comments on commit c8610ec

Please sign in to comment.