Skip to content

Commit

Permalink
Merge pull request #46 from ajb/rails-4.2
Browse files Browse the repository at this point in the history
Rails 4.2
  • Loading branch information
joecorcoran committed Jan 2, 2015
2 parents 26d4137 + 0fc2634 commit 95950d7
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rdoc
.ruby-gemset
.rspec
spec/dummy/tmp/**/*
spec/dummy/log/**/*
*.sqlite3
.rspec
gemfiles/*.lock
1 change: 0 additions & 1 deletion Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ end

appraise 'rails_4_2' do
gem 'rails', '4.2.0.rc1'
gem 'responders', '~> 2.0'
end
4 changes: 2 additions & 2 deletions app/controllers/judge/validations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class ValidationsController < ActionController::Base
include Judge::Controller

def build
respond_with(validation(params))
render json: validation(params)
end
end
end
end
1 change: 0 additions & 1 deletion judge.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Gem::Specification.new do |s|
s.license = 'MIT'

s.add_runtime_dependency 'rails', '>= 3.1'
s.add_runtime_dependency 'responders', '>= 0.9'

s.add_development_dependency 'rspec-rails', '~> 3.1'
s.add_development_dependency 'rspec-extra-formatters', '~> 1.0'
Expand Down
6 changes: 0 additions & 6 deletions lib/judge/controller.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
require 'uri'
require 'responders'

module Judge
module Controller

def self.included(base)
base.clear_respond_to
base.respond_to(:json)
end

def validation(params)
params = normalized_params(params)
if params_present?(params) && params_exposed?(params)
Expand Down

0 comments on commit 95950d7

Please sign in to comment.