Skip to content

Commit

Permalink
fix mass-assignment error when using protected_attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
soylent committed Jan 16, 2014
1 parent 7e713fc commit 6ce88e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/simple_captcha/simple_captcha_data.rb
Expand Up @@ -15,7 +15,7 @@ class SimpleCaptchaData < ::ActiveRecord::Base

class << self
def get_data(key)
where(key: key).first || new(key: key)
where(key: key).first_or_initialize
end

def remove_data(key)
Expand Down

0 comments on commit 6ce88e6

Please sign in to comment.