Skip to content

Commit

Permalink
Display file name to process and skip if attr_accessible not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Guo committed Oct 4, 2014
1 parent e971ed4 commit 07b0b8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/attr_accessible2strong_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ def self.convert(file_or_dir, no_rename = false)
@files << file_or_dir if File.exist? file_or_dir
end
@files.each do |filename|
puts filename
c = AttrAccessible2StrongParams::Converter.new
c.read_attr_accessible(filename)
next c.read_attr_accessible(filename).blank?
c.remove_attr_accessible_from_model(filename, no_rename)
c.write_controller_with_strong_params(nil, no_rename)
end
Expand Down

0 comments on commit 07b0b8d

Please sign in to comment.