Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

Commit

Permalink
closes #99
Browse files Browse the repository at this point in the history
  • Loading branch information
catmando committed Jun 8, 2018
1 parent e83188a commit 935181f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/reactive_record/permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class << self

alias belongs_to_without_reactive_record_add_is_method belongs_to

def belongs_to(attr_name, scope = nil, options = {})
belongs_to_without_reactive_record_add_is_method(attr_name, scope, options).tap do
def belongs_to(attr_name, *args)
belongs_to_without_reactive_record_add_is_method(attr_name, *args).tap do
define_method "#{attr_name}_is?".to_sym do |model|
self.class.reflections[attr_name].foreign_key == model.id
end
Expand Down

0 comments on commit 935181f

Please sign in to comment.