Replace attr_accessible with strong parameters

This commit is contained in:
Tom Hughes 2013-06-26 22:53:50 +01:00
parent 3875882172
commit f0feca800d
28 changed files with 73 additions and 75 deletions

View file

@ -84,8 +84,8 @@ private
end
def trace_valid(attrs, result = true)
entry = Trace.new(gpx_files(:public_trace_file).attributes, :without_protection => true)
entry.assign_attributes(attrs, :without_protection => true)
entry = Trace.new(gpx_files(:public_trace_file).attributes)
entry.assign_attributes(attrs)
assert_equal result, entry.valid?, "Expected #{attrs.inspect} to be #{result}"
end
end