Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
update for rails 4.0.0
  • Loading branch information
ParisZX committed Aug 25, 2013
commit 59a48f43efa4f86a69a45beffc8e8fd59934a5a7
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'rails', '3.2.13'
gem 'rails', '4.0.0'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
Expand All @@ -10,9 +10,9 @@ gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'sass-rails', '4.0.0'
gem 'less-rails'
gem 'coffee-rails', '~> 3.2.1'
gem 'coffee-rails', '4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platforms => :ruby
Expand Down
157 changes: 75 additions & 82 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,144 +1,137 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.13)
actionpack (= 3.2.13)
actionmailer (4.0.0)
actionpack (= 4.0.0)
mail (~> 2.5.3)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
actionpack (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
activerecord (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.4)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
activerecord (4.0.0)
activemodel (= 4.0.0)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.0)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.0)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.0)
atomic (1.1.13)
builder (3.1.4)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.1)
climate_control (>= 0.0.3, < 1.0)
coffee-rails (3.2.2)
coffee-rails (4.0.0)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
railties (>= 4.0.0.beta, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.2)
coffee-script-source (1.6.3)
commonjs (0.2.6)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.2)
i18n (0.6.1)
journey (1.0.4)
execjs (2.0.0)
hike (1.2.3)
i18n (0.6.5)
jquery-fileupload-rails (0.4.1)
actionpack (>= 3.1)
railties (>= 3.1)
jquery-rails (2.2.1)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.7)
less (2.3.2)
commonjs (~> 0.2.6)
less-rails (2.3.3)
actionpack (>= 3.1)
less (~> 2.3.1)
libv8 (3.11.8.17)
mail (2.5.3)
i18n (>= 0.4.0)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.22)
multi_json (1.7.2)
paperclip (3.4.1)
mime-types (1.24)
minitest (4.7.5)
multi_json (1.7.9)
paperclip (3.5.1)
activemodel (>= 3.0.0)
activerecord (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (~> 0.5.0)
mime-types
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.3)
rack
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.13)
actionmailer (= 3.2.13)
actionpack (= 3.2.13)
activerecord (= 3.2.13)
activeresource (= 3.2.13)
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
rails (4.0.0)
actionmailer (= 4.0.0)
actionpack (= 4.0.0)
activerecord (= 4.0.0)
activesupport (= 4.0.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.0)
sprockets-rails (~> 2.0.0)
railties (4.0.0)
actionpack (= 4.0.0)
activesupport (= 4.0.0)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.4)
rdoc (3.12.2)
json (~> 1.4)
ref (1.0.4)
sass (3.2.7)
sass-rails (3.2.6)
railties (~> 3.2.0)
thor (>= 0.18.1, < 2.0)
rake (10.1.0)
ref (1.0.5)
sass (3.2.10)
sass-rails (4.0.0)
railties (>= 4.0.0.beta, < 5.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
sprockets-rails (~> 2.0.0)
sprockets (2.10.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7)
therubyracer (0.11.4)
libv8 (~> 3.11.8.12)
sprockets-rails (2.0.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.8)
therubyracer (0.12.0)
libv8 (~> 3.16.14.0)
ref
thor (0.18.1)
tilt (1.3.7)
treetop (1.4.12)
thread_safe (0.1.2)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
twitter-bootstrap-rails (2.2.6)
twitter-bootstrap-rails (2.2.8)
actionpack (>= 3.1)
execjs
rails (>= 3.1)
railties (>= 3.1)
tzinfo (0.3.37)
uglifier (2.0.1)
uglifier (2.1.2)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)

PLATFORMS
ruby

DEPENDENCIES
coffee-rails (~> 3.2.1)
coffee-rails (= 4.0.0)
jquery-fileupload-rails
jquery-rails
less-rails
paperclip
rails (= 3.2.13)
sass-rails (~> 3.2.3)
rails (= 4.0.0)
sass-rails (= 4.0.0)
sqlite3
therubyracer
twitter-bootstrap-rails
Expand Down
13 changes: 12 additions & 1 deletion app/assets/stylesheets/bootstrap_and_overrides.css.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body {
@fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf?v=3.0.2");

// Font Awesome
@import "fontawesome";
@import "fontawesome/font-awesome";

// Glyphicons
//@import "twitter/bootstrap/sprites.less";
Expand All @@ -33,3 +33,14 @@ body {
//
// Example:
// @linkColor: #ff0000;

// Set the correct sprite paths
@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings");
@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white");

// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot");
@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot#iefix");
@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff");
@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf");
@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular");
7 changes: 6 additions & 1 deletion app/controllers/uploads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def edit
# POST /uploads
# POST /uploads.json
def create
@upload = Upload.new(params[:upload])
@upload = Upload.new(upload_params)

respond_to do |format|
if @upload.save
Expand Down Expand Up @@ -84,4 +84,9 @@ def destroy
format.json { head :no_content }
end
end

private
def upload_params
params.require(:upload).permit(:upload)
end
end
1 change: 0 additions & 1 deletion app/models/upload.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class Upload < ActiveRecord::Base
attr_accessible :upload
has_attached_file :upload

include Rails.application.routes.url_helpers
Expand Down