Re-namespacing a bit to clear out some fairly old stuff from the top level
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
<h1>Foo#count</h1>
|
||||
<p>Find me in app/views/foo/count.html.erb</p>
|
@@ -0,0 +1,2 @@
|
||||
<h1>Foo#index</h1>
|
||||
<p>Find me in app/views/foo/index.html.erb</p>
|
@@ -0,0 +1,2 @@
|
||||
<h1>Foo#pretty</h1>
|
||||
<p>Find me in app/views/foo/pretty.html.erb</p>
|
@@ -0,0 +1,11 @@
|
||||
<h1>Several increasingly silly ways of displaying “Hello world!”:</h1>
|
||||
|
||||
<p><%= "Hello world!" %></p>
|
||||
<p><%= "Hello" + " world!" %></p>
|
||||
<p><%= w = "world"
|
||||
"Hello #{w}!" %></p>
|
||||
<p><%= 'H' + ?e.chr + ('l' * 2) %><%= ('o word!').gsub('d', 'ld')%></p>
|
||||
|
||||
<% hello = "Hello" %>
|
||||
<% world = "world!" %>
|
||||
<%= hello %> <%= world %>
|
@@ -0,0 +1,4 @@
|
||||
<p>You first visited this site on <%= session[:first_time] %>.</p>
|
||||
<p>That was <%= time_ago_in_words session[:first_time] %> ago.</p>
|
||||
|
||||
<p>You have visited this website's pages <%= @visits %> time(s).</p>
|
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>My Website - <%= @title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>BAR :: My Website - <%= @title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>COUNT :: My Website - <%= @title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>My Pretty Website - <%= @title %></title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background: #f99;
|
||||
color: #222;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>My Plain Website - <%= @title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,4 @@
|
||||
<%= form_tag :action => 'new' do %>
|
||||
Item: <%= text_field "item", "value" %>

|
||||
<%= submit_tag "Add new item" %>
|
||||
<% end %>
|
@@ -0,0 +1,5 @@
|
||||
<ul style="font-family:monospace;">
|
||||
<% @list.each_with_index do |item, i| %>
|
||||
<%= create_li(item, i).html_safe %>
|
||||
<% end %>
|
||||
</ul>
|
@@ -0,0 +1,11 @@
|
||||
<h2>My shopping list</h2>
|
||||
|
||||
<ul>
|
||||
<% @list.each do |item| %>
|
||||
<li><%= item.name %>
|
||||
<%= link_to 'Delete', {:action => 'delete', :id => item.id} %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= render :partial => 'new_item_form' %>
|
@@ -0,0 +1,6 @@
|
||||
<h1><%= @title %></h1>
|
||||
|
||||
<p>I looked up, but saw only the number <%= @counter %></p>
|
||||
|
||||
<p>“What are you doing here?” I asked sharply. “Was it
|
||||
<%= @counter.succ %> who sent you?”</p>
|
@@ -0,0 +1,2 @@
|
||||
<p>Here they come, the counting numbers,
|
||||
<%= $one %>, <%= $two %>, <%= $three %>.</p>
|
@@ -0,0 +1,6 @@
|
||||
<!-- list.rhtml -->
|
||||
<ul>
|
||||
<% Person.find(:all).each do |person| %>
|
||||
<li>Name: <%= person.name %>, Email: <%= person.email %></li>
|
||||
<% end %>
|
||||
</ul>
|
@@ -0,0 +1,2 @@
|
||||
<h1>Processes running at <%= @time %></h1>
|
||||
<pre><%= @ps %></pre>
|
@@ -0,0 +1,14 @@
|
||||
<% if @flash %>
|
||||
<% if @flash[:message] %>
|
||||
<div id="flash-message"><%= @flash[:message] %></div>
|
||||
<% end %>
|
||||
<% if @flash[:error] %>
|
||||
<div id="flash-error"><%= @flash[:error] %></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= form_tag :action => 'process_login' do %>
|
||||
<label for="username">Username:</label> <%= text_field "user", "username" %>

|
||||
<label for="password">Password:</label> <%= password_field "user", "password" %>

|
||||
<%= submit_tag %>
|
||||
<% end %>
|
@@ -0,0 +1,2 @@
|
||||
<h1>User#logout</h1>
|
||||
<p>Find me in app/views/user/logout.html.erb</p>
|
@@ -0,0 +1,3 @@
|
||||
<h1>Account Info</h1>
|
||||
|
||||
<p>Your username is <%= User.find(session[:id]).username %>
|
@@ -0,0 +1,2 @@
|
||||
<h1>User#process_login</h1>
|
||||
<p>Find me in app/views/user/process_login.html.erb</p>
|
Reference in New Issue
Block a user