You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found that if I include a simple module from the lib folder in a Model, it cancels all validations if i include it at the top of the file. I have to include it bellow all validations to make it not cancel validations.
Also, I can't call the code in the Module although it is 'detected' and no error of missing method is thrown...
I have also tested with just including an empty module in a model and this also cancels all validations.
class Collection < ActiveRecord::Base
require MyAutoSort
Is this normal?
GEMFILE:
source 'http://rubygems.org'
gem 'rails', '~> 3.0.7'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'aws-s3', :require => 'aws/s3'
gem 'haml'
gem 'sass'
gem 'devise'
gem 'hpricot'
gem 'ruby_parser'
gem 'sitemap_generator'
gem 'haml-rails'
gem 'formtastic', '~> 1.1.0'
gem 'simple_form'
#gem 'carrierwave'
gem 'paperclip', "~> 2.3"
gem 'mini_magick'
gem 'spectator-validates_email', :require => 'validates_email'
gem 'jquery-rails'
gem "geocoder", :require => "geocoder"
gem 'will_paginate', '~> 3.0.beta'
gem 'humanizer', '~> 2.4'
gem 'aws-s3'
group :development do
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'nifty-generators'
end
group :production do
gem 'mysql2'
gem 'ruby-mysql', '~> 2.9.3'
gem 'exception_notification_rails3', :require => 'exception_notifier'
end
group :test do
gem 'rspec'
gem 'rspec-rails'
gem 'cucumber'
gem 'cucumber-rails'
gem 'capybara'
gem 'database_cleaner'
gem 'webrat'
gem 'pickle'
gem 'jasmine'
gem 'factory_girl'
gem 'builder', '~> 2.1.2'
gem 'launchy'
gem "mocha"
end
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
The text was updated successfully, but these errors were encountered:
I have found that if I include a simple module from the lib folder in a Model, it cancels all validations if i include it at the top of the file. I have to include it bellow all validations to make it not cancel validations.
Also, I can't call the code in the Module although it is 'detected' and no error of missing method is thrown...
I have also tested with just including an empty module in a model and this also cancels all validations.
Is this normal?
GEMFILE:
The text was updated successfully, but these errors were encountered: