Skip to content
Browse files

test

  • Loading branch information...
1 parent ee1a104 commit 3797ae41de64a13270d7af1b5079d0b5ae8e9d78 @commonchris committed Jan 8, 2012
View
3 app/assets/javascripts/people.js.coffee
@@ -1,3 +0,0 @@
-# Place all the behaviors and hooks related to the matching controller here.
-# All this logic will automatically be available in application.js.
-# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3 app/assets/stylesheets/people.css.scss
@@ -1,3 +0,0 @@
-// Place all the styles related to the People controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
View
83 app/controllers/people_controller.rb
@@ -1,83 +0,0 @@
-class PeopleController < ApplicationController
- # GET /people
- # GET /people.json
- def index
- @people = Person.all
-
- respond_to do |format|
- format.html # index.html.erb
- format.json { render json: @people }
- end
- end
-
- # GET /people/1
- # GET /people/1.json
- def show
- @person = Person.find(params[:id])
-
- respond_to do |format|
- format.html # show.html.erb
- format.json { render json: @person }
- end
- end
-
- # GET /people/new
- # GET /people/new.json
- def new
- @person = Person.new
-
- respond_to do |format|
- format.html # new.html.erb
- format.json { render json: @person }
- end
- end
-
- # GET /people/1/edit
- def edit
- @person = Person.find(params[:id])
- end
-
- # POST /people
- # POST /people.json
- def create
- @person = Person.new(params[:person])
-
- respond_to do |format|
- if @person.save
- format.html { redirect_to @person, notice: 'Person was successfully created.' }
- format.json { render json: @person, status: :created, location: @person }
- else
- format.html { render action: "new" }
- format.json { render json: @person.errors, status: :unprocessable_entity }
- end
- end
- end
-
- # PUT /people/1
- # PUT /people/1.json
- def update
- @person = Person.find(params[:id])
-
- respond_to do |format|
- if @person.update_attributes(params[:person])
- format.html { redirect_to @person, notice: 'Person was successfully updated.' }
- format.json { head :ok }
- else
- format.html { render action: "edit" }
- format.json { render json: @person.errors, status: :unprocessable_entity }
- end
- end
- end
-
- # DELETE /people/1
- # DELETE /people/1.json
- def destroy
- @person = Person.find(params[:id])
- @person.destroy
-
- respond_to do |format|
- format.html { redirect_to people_url }
- format.json { head :ok }
- end
- end
-end
View
2 app/helpers/people_helper.rb
@@ -1,2 +0,0 @@
-module PeopleHelper
-end
View
29 app/views/people/_form.html.erb
@@ -1,29 +0,0 @@
-<%= form_for(@person) do |f| %>
- <% if @person.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@person.errors.count, "error") %> prohibited this person from being saved:</h2>
-
- <ul>
- <% @person.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
-
- <div class="field">
- <%= f.label :name %><br />
- <%= f.text_field :name %>
- </div>
- <div class="field">
- <%= f.label :surname %><br />
- <%= f.text_field :surname %>
- </div>
- <div class="field">
- <%= f.label :email %><br />
- <%= f.text_field :email %>
- </div>
- <div class="actions">
- <%= f.submit %>
- </div>
-<% end %>
View
6 app/views/people/edit.html.erb
@@ -1,6 +0,0 @@
-<h1>Editing person</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Show', @person %> |
-<%= link_to 'Back', people_path %>
View
27 app/views/people/index.html.erb
@@ -1,27 +0,0 @@
-<h1>Listing people</h1>
-
-<table>
- <tr>
- <th>Name</th>
- <th>Surname</th>
- <th>Email</th>
- <th></th>
- <th></th>
- <th></th>
- </tr>
-
-<% @people.each do |person| %>
- <tr>
- <td><%= person.name %></td>
- <td><%= person.surname %></td>
- <td><%= person.email %></td>
- <td><%= link_to 'Show', person %></td>
- <td><%= link_to 'Edit', edit_person_path(person) %></td>
- <td><%= link_to 'Destroy', person, confirm: 'Are you sure?', method: :delete %></td>
- </tr>
-<% end %>
-</table>
-
-<br />
-
-<%= link_to 'New Person', new_person_path %>
View
5 app/views/people/new.html.erb
@@ -1,5 +0,0 @@
-<h1>New person</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Back', people_path %>
View
20 app/views/people/show.html.erb
@@ -1,20 +0,0 @@
-<p id="notice"><%= notice %></p>
-
-<p>
- <b>Name:</b>
- <%= @person.name %>
-</p>
-
-<p>
- <b>Surname:</b>
- <%= @person.surname %>
-</p>
-
-<p>
- <b>Email:</b>
- <%= @person.email %>
-</p>
-
-
-<%= link_to 'Edit', edit_person_path(@person) %> |
-<%= link_to 'Back', people_path %>
View
241 public/index.html
@@ -1,241 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Ruby on Rails: Welcome aboard</title>
- <style type="text/css" media="screen">
- body {
- margin: 0;
- margin-bottom: 25px;
- padding: 0;
- background-color: #f0f0f0;
- font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
- font-size: 13px;
- color: #333;
- }
-
- h1 {
- font-size: 28px;
- color: #000;
- }
-
- a {color: #03c}
- a:hover {
- background-color: #03c;
- color: white;
- text-decoration: none;
- }
-
-
- #page {
- background-color: #f0f0f0;
- width: 750px;
- margin: 0;
- margin-left: auto;
- margin-right: auto;
- }
-
- #content {
- float: left;
- background-color: white;
- border: 3px solid #aaa;
- border-top: none;
- padding: 25px;
- width: 500px;
- }
-
- #sidebar {
- float: right;
- width: 175px;
- }
-
- #footer {
- clear: both;
- }
-
- #header, #about, #getting-started {
- padding-left: 75px;
- padding-right: 30px;
- }
-
-
- #header {
- background-image: url("/assets/rails.png");
- background-repeat: no-repeat;
- background-position: top left;
- height: 64px;
- }
- #header h1, #header h2 {margin: 0}
- #header h2 {
- color: #888;
- font-weight: normal;
- font-size: 16px;
- }
-
-
- #about h3 {
- margin: 0;
- margin-bottom: 10px;
- font-size: 14px;
- }
-
- #about-content {
- background-color: #ffd;
- border: 1px solid #fc0;
- margin-left: -55px;
- margin-right: -10px;
- }
- #about-content table {
- margin-top: 10px;
- margin-bottom: 10px;
- font-size: 11px;
- border-collapse: collapse;
- }
- #about-content td {
- padding: 10px;
- padding-top: 3px;
- padding-bottom: 3px;
- }
- #about-content td.name {color: #555}
- #about-content td.value {color: #000}
-
- #about-content ul {
- padding: 0;
- list-style-type: none;
- }
-
- #about-content.failure {
- background-color: #fcc;
- border: 1px solid #f00;
- }
- #about-content.failure p {
- margin: 0;
- padding: 10px;
- }
-
-
- #getting-started {
- border-top: 1px solid #ccc;
- margin-top: 25px;
- padding-top: 15px;
- }
- #getting-started h1 {
- margin: 0;
- font-size: 20px;
- }
- #getting-started h2 {
- margin: 0;
- font-size: 14px;
- font-weight: normal;
- color: #333;
- margin-bottom: 25px;
- }
- #getting-started ol {
- margin-left: 0;
- padding-left: 0;
- }
- #getting-started li {
- font-size: 18px;
- color: #888;
- margin-bottom: 25px;
- }
- #getting-started li h2 {
- margin: 0;
- font-weight: normal;
- font-size: 18px;
- color: #333;
- }
- #getting-started li p {
- color: #555;
- font-size: 13px;
- }
-
-
- #sidebar ul {
- margin-left: 0;
- padding-left: 0;
- }
- #sidebar ul h3 {
- margin-top: 25px;
- font-size: 16px;
- padding-bottom: 10px;
- border-bottom: 1px solid #ccc;
- }
- #sidebar li {
- list-style-type: none;
- }
- #sidebar ul.links li {
- margin-bottom: 5px;
- }
-
- .filename {
- font-style: italic;
- }
- </style>
- <script type="text/javascript">
- function about() {
- info = document.getElementById('about-content');
- if (window.XMLHttpRequest)
- { xhr = new XMLHttpRequest(); }
- else
- { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
- xhr.open("GET","rails/info/properties",false);
- xhr.send("");
- info.innerHTML = xhr.responseText;
- info.style.display = 'block'
- }
- </script>
- </head>
- <body>
- <div id="page">
- <div id="sidebar">
- <ul id="sidebar-items">
- <li>
- <h3>Browse the documentation</h3>
- <ul class="links">
- <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
- <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
- <li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
- <li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
- </ul>
- </li>
- </ul>
- </div>
-
- <div id="content">
- <div id="header">
- <h1>Welcome aboard</h1>
- <h2>You&rsquo;re riding Ruby on Rails!</h2>
- </div>
-
- <div id="about">
- <h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
- <div id="about-content" style="display: none"></div>
- </div>
-
- <div id="getting-started">
- <h1>Getting started</h1>
- <h2>Here&rsquo;s how to get rolling:</h2>
-
- <ol>
- <li>
- <h2>Use <code>rails generate</code> to create your models and controllers</h2>
- <p>To see all available options, run it without parameters.</p>
- </li>
-
- <li>
- <h2>Set up a default route and remove <span class="filename">public/index.html</span></h2>
- <p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
- </li>
-
- <li>
- <h2>Create your database</h2>
- <p>Run <code>rake db:create</code> to create your database. If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
- </li>
- </ol>
- </div>
- </div>
-
- <div id="footer">&nbsp;</div>
- </div>
- </body>
-</html>

0 comments on commit 3797ae4

Please sign in to comment.
Something went wrong with that request. Please try again.