이전에는 문제가 없었습니다. 나는 약간의 설정을 해왔다. 그래서 일부 설정을 모르게 변경했을 수 있습니다. 여기레일 콘솔 : 새로 고침! 모델 파일의 변경 사항을 반영하지 않습니까? 가능한 이유는 무엇일까요?
는
다음config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# migration prefix with sequence #s
config.active_record.timestamped_migrations = false
#time zone
config.time_zone = 'UTC'
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
config.active_record.schema_format = :sql
내가 다시로드를 실행 application.rb
의 설정 부분은 환경 설정/development.rb입니다! 레일 콘솔에서 true를 반환합니다.
사용자 지정 유효성 검사는 어떻게됩니까? 일부 메소드를 정의하고 validate로 등록했습니다. 유효성 검사 논리를 변경하면 다시로드되지 않습니다. –
개체를 다시 초기화 할 때 반영됩니다. –