Skip to content

Commit

Permalink
Add ERB support
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoA committed Jul 4, 2022
1 parent 5876271 commit 4afb544
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
PATH
remote: ../rulers
specs:
rulers (0.1.0)
rulers (0.1.1)
erubis (~> 2.7.0)
rack (~> 2.2.4)

GEM
remote: https://rubygems.org/
specs:
erubis (2.7.0)
ffi (1.15.5)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
Expand Down
4 changes: 1 addition & 3 deletions app/controllers/quotes_controller.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
class QuotesController < Rulers::Controller
def a_quote
"There is nothing either good or bad " +
"But thinking makes it so." +
"\n<pre>\n#{env}\n</pre>\n"
render :a_quote, :noun => :thinking
end

def exception
Expand Down
10 changes: 10 additions & 0 deletions app/views/quotes/a_quote.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<p>
There is nothing either good or bad but
<%= noun %> makes it so.
</p>

<p>
Ruby version <%= env["PATH_INFO"] %>
</p>


0 comments on commit 4afb544

Please sign in to comment.