1
0
Fork 0

Add controller for lunches

This commit is contained in:
Andrew Tomaka 2014-11-06 13:52:28 -05:00
parent 2665250d32
commit f837c730e6
12 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# 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://coffeescript.org/

View file

@ -0,0 +1,3 @@
// Place all the styles related to the Lunches controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View file

@ -0,0 +1,22 @@
class LunchesController < ApplicationController
def index
end
def show
end
def new
end
def create
end
def edit
end
def update
end
def destroy
end
end

View file

@ -0,0 +1,2 @@
module LunchesHelper
end

View file

@ -24,6 +24,7 @@
<li><%= link_to 'Home', root_path %></li>
<% if current_user %>
<li><%= link_to 'Friends', friendships_path %></li>
<li><%= link_to 'Lunches', lunches_path %></li>
<li><%= link_to 'Users', users_path %></li>
<% end %>
</ul>

View file

View file

View file

View file

View file

@ -5,6 +5,7 @@ Rails.application.routes.draw do
resources :home, only: [ :show ]
resources :friendships, only: [ :index, :show, :create, :destroy ]
resources :lunches
resources :sessions, only: [ :create, :destroy ]
resources :users, only: [ :index, :show ]

View file

@ -0,0 +1,7 @@
require 'test_helper'
class LunchesControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end

View file

@ -0,0 +1,4 @@
require 'test_helper'
class LunchesHelperTest < ActionView::TestCase
end