Skip to content

Commit

Permalink
Temporary fix for heapsource#26
Browse files Browse the repository at this point in the history
  • Loading branch information
garethrees committed Oct 6, 2015
1 parent 03c114b commit 0eb977b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/active_model/one_time_password.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,19 @@ def otp_column=(attr)
end

def otp_counter
self.public_send(self.class.otp_counter_column_name)
if self.class.otp_counter_column_name != 'otp_counter'
self.public_send(self.class.otp_counter_column_name)
else
super
end
end

def otp_counter=(attr)
self.public_send("#{self.class.otp_counter_column_name}=", attr)
if self.class.otp_counter_column_name != 'otp_counter'
self.public_send("#{self.class.otp_counter_column_name}=", attr)
else
super
end
end
end
end
Expand Down

0 comments on commit 0eb977b

Please sign in to comment.