Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rails/convert_models_2_3_to_3_0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
# Post.where("title = ?", title).update_all("title = \'title\'")
within_node type: 'send', message: :update_all, arguments: { size: 2 } do
updates_node, conditions_node = node.arguments
replace_with add_receiver_if_necessary("where(#{(strip_brackets(conditions_node.to_source))}).update_all(#{strip_brackets(updates_node.to_source)})")
replace_with add_receiver_if_necessary("where(#{strip_brackets(conditions_node.to_source)}).update_all(#{strip_brackets(updates_node.to_source)})")
end

# Post.update_all({:title => "title"}, {:title => "test"}, {:limit => 2})
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby/iconv_to_encode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
must_silently_ignore_bad_chars = from_charset.type == :str &&
from_charset.to_value.split('//').include?('IGNORE')
encode_options = ''
if (must_silently_ignore_bad_chars)
if must_silently_ignore_bad_chars
encode_options = ', invalid: :replace, undef: :replace'
end
cleaned_from_charset = from_charset.to_source.gsub(/\/{2}[^\/']+/, '')
Expand Down