1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record/relation
Sameer Rahmani d763956ed9 Extra caller details added to ActiveRecord::RecordNotFound
ActiveRecord::RecordNotFound modified to store model name, primary_key
and id of the caller model. It allows the catcher of this exception to make
a better decision to what to do with it. For example consider this simple
example:

    class SomeAbstractController < ActionController::Base
      rescue_from ActiveRecord::RecordNotFound, with: :redirect_to_404

      private def redirect_to_404(e)
        return redirect_to(posts_url) if e.model == 'Post'
        raise
      end
    end
2015-07-21 19:19:14 +04:30
..
predicate_builder Respect custom primary keys for associations in Relation#where 2015-02-04 08:56:46 -07:00
batches.rb correct method name in deprecation message 2015-02-18 01:42:57 +09:00
calculations.rb [skip ci] #distinct instead of #uniq 2015-07-03 11:11:59 +02:00
delegation.rb Freeze string literals when not mutated. 2015-07-19 17:45:10 -05:00
finder_methods.rb Extra caller details added to ActiveRecord::RecordNotFound 2015-07-21 19:19:14 +04:30
from_clause.rb
merger.rb Fix regression caused by a01d164b 2015-07-07 13:40:50 -03:00
predicate_builder.rb Freeze string literals when not mutated. 2015-07-19 17:45:10 -05:00
query_attribute.rb Remove Relation#bind_params 2015-01-27 16:10:03 -07:00
query_methods.rb Include Enumerable in ActiveRecord::Relation 2015-06-19 15:35:35 -06:00
record_fetch_warning.rb [skip ci] Improve warn_on_records_fetched documentation 2015-03-27 15:36:44 +05:30
spawn_methods.rb Raise ArgumentError when passing nil to Relation#merge 2015-02-06 17:53:06 -02:00
where_clause.rb Fix unscope for less than 2015-03-27 20:10:57 +09:00
where_clause_factory.rb