Skip to content

Commit

Permalink
I made a change in Rails, and broke my gem
Browse files Browse the repository at this point in the history
Error message has been changed on rails/rails#17019
And did_you_mean should be aware of it.
  • Loading branch information
yuki24 committed Oct 24, 2014
1 parent fcf8c7f commit 4252174
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ appraise "activerecord_41" do
end

appraise "activerecord_42" do
gem "activerecord", "~> 4.2.0.beta1"
gem "activerecord", "~> 4.2.0.beta2"
end

appraise "activerecord_edge" do
Expand Down
2 changes: 1 addition & 1 deletion lib/did_you_mean/finders/similar_attribute_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class SimilarAttributeFinder

def initialize(exception)
@columns = exception.frame_binding.eval("self.class").columns
@attribute_name = exception.original_message.gsub("unknown attribute: ", "")
@attribute_name = (/unknown attribute(: | ')(\w+)('* for .*)*/ =~ exception.original_message) && $2
end

def words
Expand Down

0 comments on commit 4252174

Please sign in to comment.