Skip to content

Commit

Permalink
eventsモデル作成
Browse files Browse the repository at this point in the history
  • Loading branch information
seit committed Jan 23, 2012
1 parent 907a449 commit cda4af6
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/events.js.coffee
Original file line number Diff line number Diff line change
@@ -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/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/events.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the events controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
2 changes: 2 additions & 0 deletions app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class EventsController < ApplicationController
end
2 changes: 2 additions & 0 deletions app/helpers/events_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module EventsHelper
end
2 changes: 2 additions & 0 deletions app/models/event.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Event < ActiveRecord::Base
end
11 changes: 11 additions & 0 deletions db/migrate/20120123233459_create_events.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CreateEvents < ActiveRecord::Migration
def change
create_table :events do |t|
t.string :name
t.text :description
t.integer :user_id

t.timestamps
end
end
end
11 changes: 11 additions & 0 deletions test/fixtures/events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html

one:
name: MyString
description: MyText
user_id: 1

two:
name: MyString
description: MyText
user_id: 1
7 changes: 7 additions & 0 deletions test/functional/events_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'test_helper'

class EventsControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end
7 changes: 7 additions & 0 deletions test/unit/event_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'test_helper'

class EventTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
4 changes: 4 additions & 0 deletions test/unit/helpers/events_helper_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'test_helper'

class EventsHelperTest < ActionView::TestCase
end

0 comments on commit cda4af6

Please sign in to comment.