frozen_record
frozen_record copied to clipboard
Support for find with a block is missing
FrozenRecord.Scope#find, in frozen_record/scope.rb, does not support that a block is passed to it
def find(id)
raise RecordNotFound, "Can't lookup record without ID" unless id
scope = self
if @limit || @offset
scope = limit(nil).offset(nil)
end
scope.find_by_id(id) or raise RecordNotFound, "Couldn't find a record with ID = #{id.inspect}"
end
It seems it should, as ActiveRecord.FinderMethods#find in active_record/relation/finder_methods.rb
def find(*args)
return super if block_given?
find_with_ids(*args)
end
yep. PR welcome