module Partitionable::ActsAsPartitionable::LocalInstanceMethods
Public Instance Methods
create_partition_from_record()
click to toggle source
# File lib/partitionable/acts_as_partitionable.rb, line 131 def create_partition_from_record return if has_partition? month = self.send(self.class.logdate_attr.to_sym).month year = self.send(self.class.logdate_attr.to_sym).year self.class.create_partition(month,year) self.class.update_trigger end
has_partition?()
click to toggle source
# File lib/partitionable/acts_as_partitionable.rb, line 125 def has_partition? month = self.send(self.class.logdate_attr.to_sym).month year = self.send(self.class.logdate_attr.to_sym).year self.class.partition_exists? month,year end