comparison config/initializers/10-patches.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents 261b3d9a4903
children
comparison
equal deleted inserted replaced
1516:b450a9d58aed 1517:dffacf8a6908
200 "Setting the session secret with ActionController.session= is no longer supported in Rails 3." 200 "Setting the session secret with ActionController.session= is no longer supported in Rails 3."
201 exit 1 201 exit 1
202 end 202 end
203 end 203 end
204 end 204 end
205
206 if Rails::VERSION::MAJOR < 4 && RUBY_VERSION >= "2.1"
207 module ActiveSupport
208 class HashWithIndifferentAccess
209 def select(*args, &block)
210 dup.tap { |hash| hash.select!(*args, &block) }
211 end
212
213 def reject(*args, &block)
214 dup.tap { |hash| hash.reject!(*args, &block) }
215 end
216 end
217
218 class OrderedHash
219 def select(*args, &block)
220 dup.tap { |hash| hash.select!(*args, &block) }
221 end
222
223 def reject(*args, &block)
224 dup.tap { |hash| hash.reject!(*args, &block) }
225 end
226 end
227 end
228 end
229
230 require 'awesome_nested_set/version'
231
232 module CollectiveIdea
233 module Acts
234 module NestedSet
235 module Model
236 def leaf_with_new_record?
237 new_record? || leaf_without_new_record?
238 end
239 alias_method_chain :leaf?, :new_record
240 # Reload is needed because children may have updated
241 # their parent (self) during deletion.
242 if ::AwesomeNestedSet::VERSION > "2.1.6"
243 module Prunable
244 def destroy_descendants_with_reload
245 destroy_descendants_without_reload
246 reload
247 end
248 alias_method_chain :destroy_descendants, :reload
249 end
250 else
251 def destroy_descendants_with_reload
252 destroy_descendants_without_reload
253 reload
254 end
255 alias_method_chain :destroy_descendants, :reload
256 end
257 end
258 end
259 end
260 end