Update to rails 3.0.5, arel 2.0.9 and composite_primary_keys 3.1.4

This commit is contained in:
Tom Hughes 2011-03-15 18:47:48 +00:00
parent 604011d6a8
commit 6d59a122ea
7 changed files with 26 additions and 17 deletions

View file

@ -1,9 +1,9 @@
source 'http://rubygems.org'
gem 'rails', '3.0.4'
gem 'rails', '3.0.5'
gem 'pg'
gem 'arel', '>= 2.0.8'
gem 'arel', '>= 2.0.9'
gem 'libxml-ruby', '>= 2.0.5', :require => 'libxml'
gem 'rmagick', :require => 'RMagick'
gem 'oauth', '>= 0.4.4'
@ -18,7 +18,7 @@ gem 'validates_email_format_of', '>= 1.4.5'
gem 'memcached'
# Should only load if we're not in database offline mode
gem 'composite_primary_keys', '>= 3.1.1'
gem 'composite_primary_keys', '>= 3.1.4'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators

View file

@ -1,13 +1,6 @@
require 'rubygems'
# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])

View file

@ -1,5 +1,5 @@
OpenStreetMap::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development

View file

@ -1,5 +1,5 @@
OpenStreetMap::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
# Settings specified here will take precedence over those in config/application.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests

View file

@ -1,5 +1,5 @@
OpenStreetMap::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that

View file

@ -4,5 +4,5 @@ OpenStreetMap::Application.config.session_store :cookie_store, :key => '_osm_ses
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rake db:sessions:create")
# (create the session table with "rails generate session_migration")
# OpenStreetMap::Application.config.session_store :active_record_store

View file

@ -172,4 +172,20 @@
input.disabled = false;
});
});
Ajax.Responders.register({
onCreate: function(request) {
var csrf_meta_tag = $$('meta[name=csrf-token]')[0];
if (csrf_meta_tag) {
var header = 'X-CSRF-Token',
token = csrf_meta_tag.readAttribute('content');
if (!request.options.requestHeaders) {
request.options.requestHeaders = {};
}
request.options.requestHeaders[header] = token;
}
}
});
})();