Revision 1623
Added by Jean-Philippe Lang almost 17 years ago
environment.rb | ||
---|---|---|
5 | 5 |
# ENV['RAILS_ENV'] ||= 'production' |
6 | 6 |
|
7 | 7 |
# Specifies gem version of Rails to use when vendor/rails is not present |
8 |
RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
|
|
8 |
RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
|
|
9 | 9 |
|
10 | 10 |
# Bootstrap the Rails environment, frameworks, and default configuration |
11 | 11 |
require File.join(File.dirname(__FILE__), 'boot') |
... | ... | |
71 | 71 |
config.action_mailer.delivery_method = :smtp |
72 | 72 |
|
73 | 73 |
end |
74 |
|
|
75 |
ActiveRecord::Errors.default_error_messages = { |
|
76 |
:inclusion => "activerecord_error_inclusion", |
|
77 |
:exclusion => "activerecord_error_exclusion", |
|
78 |
:invalid => "activerecord_error_invalid", |
|
79 |
:confirmation => "activerecord_error_confirmation", |
|
80 |
:accepted => "activerecord_error_accepted", |
|
81 |
:empty => "activerecord_error_empty", |
|
82 |
:blank => "activerecord_error_blank", |
|
83 |
:too_long => "activerecord_error_too_long", |
|
84 |
:too_short => "activerecord_error_too_short", |
|
85 |
:wrong_length => "activerecord_error_wrong_length", |
|
86 |
:taken => "activerecord_error_taken", |
|
87 |
:not_a_number => "activerecord_error_not_a_number" |
|
88 |
} |
|
89 |
|
|
90 |
ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" } |
|
91 |
|
|
92 |
Mime::SET << Mime::CSV unless Mime::SET.include?(Mime::CSV) |
|
93 |
Mime::Type.register 'application/pdf', :pdf |
|
94 |
|
|
95 |
GLoc.set_config :default_language => :en |
|
96 |
GLoc.clear_strings |
|
97 |
GLoc.set_kcode |
|
98 |
GLoc.load_localized_strings |
|
99 |
GLoc.set_config(:raise_string_not_found_errors => false) |
|
100 |
|
|
101 |
require 'redmine' |
|
102 |
|
Also available in: Unified diff
Merged Rails 2.1 compatibility branch.