Permalink
Browse files

added recipes to rails

  • Loading branch information...
1 parent 6144439 commit ad946d3739c5dab006723e43b54c875387a32fe0 @webdev committed Nov 7, 2011
View
@@ -17,6 +17,11 @@ group :assets do
end
gem 'jquery-rails'
+gem "npm_assets"
+gem "inherited_resources"
+
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
View
@@ -54,8 +54,12 @@ GEM
execjs (1.2.9)
multi_json (~> 1.0)
haml (3.1.3)
+ has_scope (0.5.1)
hike (1.2.1)
i18n (0.6.0)
+ inherited_resources (1.3.0)
+ has_scope (~> 0.5.0)
+ responders (~> 0.6.0)
jquery-rails (1.0.16)
railties (~> 3.0)
thor (~> 0.14)
@@ -96,6 +100,7 @@ GEM
rake (0.9.2.2)
rdoc (3.11)
json (~> 1.4)
+ responders (0.6.4)
sass (3.1.10)
sass-rails (3.1.4)
actionpack (~> 3.1.0)
@@ -126,6 +131,7 @@ PLATFORMS
DEPENDENCIES
bfec_generator
coffee-rails (~> 3.1.0)
+ inherited_resources
jasminerice!
jquery-rails
npm_assets
@@ -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://jashkenas.github.com/coffee-script/
@@ -0,0 +1,3 @@
+// Place all the styles related to the Recipes controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,2 @@
+class RecipesController < ApplicationController
+end
@@ -0,0 +1,2 @@
+module RecipesHelper
+end
View
@@ -0,0 +1,2 @@
+class Recipe < ActiveRecord::Base
+end
View
@@ -1,4 +1,6 @@
Cookbook::Application.routes.draw do
+ resources :recipes
+
# The priority is based upon order of creation:
# first created -> highest priority.
@@ -0,0 +1,10 @@
+class CreateRecipes < ActiveRecord::Migration
+ def change
+ create_table :recipes do |t|
+ t.string :title
+ t.string :description
+
+ t.timestamps
+ end
+ end
+end
View
@@ -0,0 +1,23 @@
+# encoding: UTF-8
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
+
+ActiveRecord::Schema.define(:version => 20111107231240) do
+
+ create_table "recipes", :force => true do |t|
+ t.string "title"
+ t.string "description"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+end
View
No changes.
View
No changes.
No changes.
@@ -1,12 +0,0 @@
-require 'test_helper'
-require 'rails/performance_test_help'
-
-class BrowsingTest < ActionDispatch::PerformanceTest
- # Refer to the documentation for all available options
- # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
- # :output => 'tmp/performance', :formats => [:flat] }
-
- def test_homepage
- get '/'
- end
-end
View
@@ -1,13 +0,0 @@
-ENV["RAILS_ENV"] = "test"
-require File.expand_path('../../config/environment', __FILE__)
-require 'rails/test_help'
-
-class ActiveSupport::TestCase
- # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
- #
- # Note: You'll currently still have to declare fixtures explicitly in integration tests
- # -- they do not yet inherit this setting
- fixtures :all
-
- # Add more helper methods to be used by all tests here...
-end
View
No changes.

0 comments on commit ad946d3

Please sign in to comment.