Skip to content
Extraits de code Groupes Projets
Valider b16f309a rédigé par Steven Hancock's avatar Steven Hancock
Parcourir les fichiers

Upgrade Rails Admin to latest gem

This gives us a clean fix for the Kaminari vs. Will Paginate
issues and fixes a few other little bugs in Rails Admin.

fixes #3210
parent f820e378
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -35,7 +35,7 @@ gem 'newrelic_rpm' ...@@ -35,7 +35,7 @@ gem 'newrelic_rpm'
gem "rpm_contrib", "~> 2.1.7" gem "rpm_contrib", "~> 2.1.7"
group :production do # we don't install these on travis to speed up test runs group :production do # we don't install these on travis to speed up test runs
gem 'rails_admin' gem 'rails_admin', '~> 0.0.2'
gem 'rack-ssl', :require => 'rack/ssl' gem 'rack-ssl', :require => 'rack/ssl'
gem 'rack-rewrite', '~> 1.2.1', :require => false gem 'rack-rewrite', '~> 1.2.1', :require => false
gem 'rack-piwik', :require => 'rack/piwik' gem 'rack-piwik', :require => 'rack/piwik'
......
...@@ -161,7 +161,7 @@ GEM ...@@ -161,7 +161,7 @@ GEM
erubis (2.7.0) erubis (2.7.0)
eventmachine (1.0.0.beta.4) eventmachine (1.0.0.beta.4)
excon (0.13.2) excon (0.13.2)
execjs (1.3.0) execjs (1.3.2)
multi_json (~> 1.0) multi_json (~> 1.0)
factory_girl (2.6.4) factory_girl (2.6.4)
activesupport (>= 2.3.9) activesupport (>= 2.3.9)
...@@ -216,7 +216,7 @@ GEM ...@@ -216,7 +216,7 @@ GEM
guard-spork (0.5.2) guard-spork (0.5.2)
guard (>= 0.10.0) guard (>= 0.10.0)
spork (>= 0.8.4) spork (>= 0.8.4)
haml (3.1.4) haml (3.1.5)
handlebars_assets (0.4.1) handlebars_assets (0.4.1)
execjs (>= 1.2.9) execjs (>= 1.2.9)
sprockets (>= 2.0.3) sprockets (>= 2.0.3)
...@@ -250,7 +250,7 @@ GEM ...@@ -250,7 +250,7 @@ GEM
jquery-ui-rails (0.2.2) jquery-ui-rails (0.2.2)
jquery-rails jquery-rails
railties (>= 3.1.0) railties (>= 3.1.0)
json (1.6.6) json (1.7.1)
jwt (0.1.4) jwt (0.1.4)
json (>= 1.2.4) json (>= 1.2.4)
kaminari (0.13.0) kaminari (0.13.0)
...@@ -357,13 +357,13 @@ GEM ...@@ -357,13 +357,13 @@ GEM
railties (= 3.1.4) railties (= 3.1.4)
rails-i18n (0.6.3) rails-i18n (0.6.3)
i18n (~> 0.5) i18n (~> 0.5)
rails_admin (0.0.1) rails_admin (0.0.2)
bbenezech-nested_form (~> 0.0.6) bbenezech-nested_form (~> 0.0.6)
bootstrap-sass (~> 2.0) bootstrap-sass (~> 2.0)
builder (~> 3.0) builder (~> 3.0)
coffee-rails (~> 3.1) coffee-rails (~> 3.1)
haml (~> 3.1) haml (~> 3.1)
jquery-rails (>= 1.0) jquery-rails (>= 1.0.17)
jquery-ui-rails (~> 0.2.2) jquery-ui-rails (~> 0.2.2)
kaminari (~> 0.12) kaminari (~> 0.12)
rack-pjax (~> 0.5) rack-pjax (~> 0.5)
...@@ -424,7 +424,7 @@ GEM ...@@ -424,7 +424,7 @@ GEM
ruby-oembed (0.8.7) ruby-oembed (0.8.7)
ruby-progressbar (0.0.10) ruby-progressbar (0.0.10)
rubyzip (0.9.8) rubyzip (0.9.8)
sass (3.1.15) sass (3.1.17)
sass-rails (3.1.4) sass-rails (3.1.4)
actionpack (~> 3.1.0) actionpack (~> 3.1.0)
railties (~> 3.1.0) railties (~> 3.1.0)
...@@ -443,7 +443,7 @@ GEM ...@@ -443,7 +443,7 @@ GEM
rack-protection (~> 1.2) rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3) tilt (~> 1.3, >= 1.3.3)
spork (1.0.0rc2) spork (1.0.0rc2)
sprockets (2.0.3) sprockets (2.0.4)
hike (~> 1.2) hike (~> 1.2)
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
...@@ -563,7 +563,7 @@ DEPENDENCIES ...@@ -563,7 +563,7 @@ DEPENDENCIES
rack-ssl rack-ssl
rails (= 3.1.4) rails (= 3.1.4)
rails-i18n rails-i18n
rails_admin rails_admin (~> 0.0.2)
rails_autolink rails_autolink
redcarpet (= 2.0.1) redcarpet (= 2.0.1)
remotipart (~> 1.0) remotipart (~> 1.0)
......
# RailsAdmin config file. Generated on March 24, 2012 15:34 # RailsAdmin config file. Generated on March 24, 2012 15:34
# See github.com/sferik/rails_admin for more informations # See github.com/sferik/rails_admin for more informations
if Rails.env.production? if Rails.env.production?
# Recommended way to deal with Kaminari vs. WillPaginate issues
if defined?(WillPaginate)
Kaminari.configure do |config|
config.page_method_name = :per_page_kaminari
end
end
RailsAdmin.config do |config| RailsAdmin.config do |config|
config.authorize_with do config.authorize_with do
redirect_to main_app.root_path unless current_user.try(:admin?) redirect_to main_app.root_path unless current_user.try(:admin?)
...@@ -1128,17 +1134,4 @@ RailsAdmin.config do |config| ...@@ -1128,17 +1134,4 @@ RailsAdmin.config do |config|
# update do; end # update do; end
# end # end
end end
if defined?(WillPaginate)
module WillPaginate
module ActiveRecord
module RelationMethods
def per(value = nil) per_page(value) end
def total_count() count end
end
end
module CollectionMethods
alias_method :num_pages, :total_pages
end
end
end
end end
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter