Skip to content

Commit

Permalink
Separating erb code in separate files into a new views folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
bishboria committed Sep 10, 2011
1 parent e847546 commit 2c95cf4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
14 changes: 0 additions & 14 deletions Examples/Calculator/lib/web_calculator.rb
Expand Up @@ -72,17 +72,3 @@ def load_calculator
display_result_from calculator
end
end

__END__
@@ layout
<h1>Calculator is Ready!</h1>
<%= yield %>

@@ index
<form method="POST" action="/">
<input type="text" disabled name="display" id="display" value="<%=@display %>" />
<input type="text" name="number" id="number" />
<input type="submit" name="operator" id="minus" text="-" value="minus" />
<input type="submit" name="operator" id="plus" text="+" value="plus" />
<input type="submit" name="operator" id="equals" text="=" value="equals" />
</form>
7 changes: 7 additions & 0 deletions Examples/Calculator/views/index.erb
@@ -0,0 +1,7 @@
<form method="POST" action="/">
<input type="text" disabled name="display" id="display" value="<%=@display %>" />
<input type="text" name="number" id="number" />
<input type="submit" name="operator" id="minus" text="-" value="minus" />
<input type="submit" name="operator" id="plus" text="+" value="plus" />
<input type="submit" name="operator" id="equals" text="=" value="equals" />
</form>
2 changes: 2 additions & 0 deletions Examples/Calculator/views/layout.erb
@@ -0,0 +1,2 @@
<h1>Calculator is Ready!</h1>
<%= yield %>

0 comments on commit 2c95cf4

Please sign in to comment.