status_for 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,7 +95,7 @@ module StatusFor
95
95
 
96
96
  module StatusInstanceMethods
97
97
 
98
- def method_missing(method_id, subject_ids, &block)
98
+ def method_missing(method_id, *subject_ids, &block)
99
99
  # This creates a method for instanced object called 'mark_as_status_for(subject)' that
100
100
  # adds the subject id into relevant database column.
101
101
  # Example: @message.mark_as_deleted_for(user)
@@ -164,10 +164,10 @@ module StatusFor
164
164
  if !self.class.column_names.include?(method_id + '_for')
165
165
  raise "need to include the #{method_id}_for column in #{self.class.table_name} table"
166
166
  end
167
- unless subject_id.is_a? Integer
167
+ unless subject_id.first.is_a? Integer
168
168
  raise "subject_id must be an Integer!"
169
169
  end
170
- return status_for_psql_array_to_array(self.send ((method_id +'_for').to_sym)).include?(subject_id)
170
+ return status_for_psql_array_to_array(self.send ((method_id +'_for').to_sym)).include?(subject_id.first)
171
171
  end
172
172
  end
173
173
 
@@ -1,3 +1,3 @@
1
1
  module ActsAsStatusFor
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: status_for
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: