Reputation: 3333
I have this line config.filter_parameters += [:password, :efile, :title]
in application.rb.
But when I try to save a model like this:
@claim_db[:xml] = xml_builder.to_xml.gsub('utf-8', 'utf-16')
@claim_db[:title] = title.present? ? title : nil
@claim_db[:applicants] = applicants.present? ? applicants : nil
@claim_db[:native_number] = nn.present? ? nn : nil
@claim_db[:change_date] = Time.now
@claim_db[:is_signed] = false
@claim_db[:with_errors] = errors.count > 0
@claim_db.save!
in a log a get:
←[1m←[36mAREL (2.0ms)←[0m ←[1mINSERT INTO [edocs] ([eclaim_id], [materialtitl
e_id], [is_secondary], [title], [ext], [size], [code], [receive_date], [reg_date
], [reg_numb], [idcead], [efile]) VALUES (100003, 7, 0, N'test', N'rtf', 4, N'test', '2012-05-11 21:05:12
.125', NULL, NULL, NULL, 0x61737373)←[0m
←[1m←[35mEXECUTE (0.0ms)←[0m COMMIT TRANSACTION
How can I fix it?
Upvotes: 0
Views: 364
Reputation: 5403
This config setting is for parameter logging - when you hit your controller with a params hash, these will be omitted from that hash in the log. In production mode, your SQL queries are not logged.
Upvotes: 3