Sha256: 1603310118e8771b21fde4f5dc2765a673834467b68df26be119e04eef553859

Contents?: true

Size: 400 Bytes

Versions: 10

Compression:

Stored size: 400 Bytes

Contents

module Micronaut
  module Rails
    module Extensions
      
      module ActiveRecord
        def errors_on(attribute)
          self.valid?
          [self.errors.on(attribute)].flatten.compact
        end
        alias :error_on :errors_on  
      end
      
    end
  end
end

if defined?(::ActiveRecord::Base)
  ::ActiveRecord::Base.send(:include, Micronaut::Rails::Extensions::ActiveRecord)
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spicycode-micronaut-rails-0.0.6.1 lib/micronaut/rails/extensions/active_record.rb
spicycode-micronaut-rails-0.0.6.2 lib/micronaut/rails/extensions/active_record.rb
spicycode-micronaut-rails-0.1.7.0 lib/micronaut/rails/extensions/active_record.rb
spicycode-micronaut-rails-0.1.7.1 lib/micronaut/rails/extensions/active_record.rb
spicycode-micronaut-rails-0.1.8.0 lib/micronaut/rails/extensions/active_record.rb
spicycode-micronaut-rails-0.1.8.1 lib/micronaut/rails/extensions/active_record.rb
spicycode-micronaut-rails-0.1.9.0 lib/micronaut/rails/extensions/active_record.rb
spicycode-micronaut-rails-0.2.0.0 lib/micronaut/rails/extensions/active_record.rb
spicycode-micronaut-rails-0.2.2 lib/micronaut/rails/extensions/active_record.rb
spicycode-micronaut-rails-0.2.3 lib/micronaut/rails/extensions/active_record.rb