John Mileham wrote:
What about the security ramifications of logging potentially sensitive
information? IDs can be sensitive, but often far less than other fields.
There are legitimate use cases for using find_by on values that you'd
prefer not to be logged or known by the end user.
What about the security ramifications of logging potentially sensitive
information? IDs can be sensitive, but often far less than other fields.
There are legitimate use cases for using find_by on values that you'd
prefer not to be logged or known by the end user. Making
more-informative error
On Feb 8, 2015, at 11:07 AM, Иван Бишевац ivan.bise...@gmail.com wrote:
User.find(1)
for no record with gives:
def test_error_message
begin
User.find(1)
rescue ActiveRecord::RecordNotFound = e
message = e.message
end
assert_equal message, Couldn't find User with
I think that sounds reasonable. Please submit a PR.
On 9 Feb 2015, at 03:07, Иван Бишевац ivan.bise...@gmail.com wrote:
User.find(1)
for no record with gives:
def test_error_message
begin
User.find(1)
rescue ActiveRecord::RecordNotFound = e
message = e.message
end
User.find(1)
for no record with gives:
def test_error_message
begin
User.find(1)
rescue ActiveRecord::RecordNotFound = e
message = e.message
end
assert_equal message, Couldn't find User with 'id'=1
end
I expected same behavior wiht find_by! method but it doesn't give so