Skip to content

Commit dbcae39

Browse files
author
Richard Xia
committed
Merge remote branch 'public2/master' into hw2_start
Conflicts: .gitignore Gemfile config/environments/production.rb db/development.sqlite3
2 parents 7d0729a + 1a1f500 commit dbcae39

File tree

8 files changed

+32
-4
lines changed

8 files changed

+32
-4
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#*
1+
\#*\#
22
*~
33
TAGS
44
db/schema.rb

Gemfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ gem 'rails', '3.1.0'
88
# for Heroku deployment - as described in Ap. A of ELLS book
99
group :development, :test do
1010
gem 'sqlite3'
11+
gem 'ruby-debug19', :require => 'ruby-debug'
12+
end
13+
group :production do
14+
gem 'pg'
1115
end
1216

1317
# Gems used only for assets and not required
@@ -28,5 +32,4 @@ gem 'jquery-rails'
2832
# gem 'capistrano'
2933

3034
# To use debugger
31-
gem 'ruby-debug19', :require => 'ruby-debug'
3235
gem 'haml'

app/models/.gitkeep

Whitespace-only changes.

config/environments/production.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
# Compress JavaScripts and CSS
1515
config.assets.compress = true
1616

17-
# Don't fallback to assets pipeline if a precompiled asset is missed
18-
config.assets.compile = false
17+
# DO fallback to assets pipeline if a precompiled asset is missed
18+
config.assets.compile = true
1919

2020
# Generate digests for assets URLs
2121
config.assets.digest = true

db/development.sqlite3

-7 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
class AddMoreMovies < ActiveRecord::Migration
2+
MORE_MOVIES = [
3+
{:title => 'Aladdin', :rating => 'G', :release_date => '25-Nov-1992'},
4+
{:title => 'The Terminator', :rating => 'R', :release_date => '26-Oct-1984'},
5+
{:title => 'When Harry Met Sally', :rating => 'R', :release_date => '21-Jul-1989'},
6+
{:title => 'The Help', :rating => 'PG-13', :release_date => '10-Aug-2011'},
7+
{:title => 'Chocolat', :rating => 'PG-13', :release_date => '5-Jan-2001'},
8+
{:title => 'Amelie', :rating => 'R', :release_date => '25-Apr-2001'},
9+
{:title => '2001: A Space Odyssey', :rating => 'G', :release_date => '6-Apr-1968'},
10+
{:title => 'The Incredibles', :rating => 'PG', :release_date => '5-Nov-2004'},
11+
{:title => 'Raiders of the Lost Ark', :rating => 'PG', :release_date => '12-Jun-1981'},
12+
{:title => 'Chicken Run', :rating => 'G', :release_date => '21-Jun-2000'},
13+
]
14+
def up
15+
MORE_MOVIES.each do |movie|
16+
Movie.create!(movie)
17+
end
18+
end
19+
20+
def down
21+
MORE_MOVIES.each do |movie|
22+
Movie.find_by_title_and_rating(movie[:title], movie[:rating]).destroy
23+
end
24+
end
25+
end

lib/assets/.gitkeep

Whitespace-only changes.

vendor/assets/stylesheets/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)