Adds a branch for unlimited project hierarchy.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2148 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
|
||||
ActiveRecord::Errors.default_error_messages = {
|
||||
:inclusion => "activerecord_error_inclusion",
|
||||
:exclusion => "activerecord_error_exclusion",
|
||||
:invalid => "activerecord_error_invalid",
|
||||
:confirmation => "activerecord_error_confirmation",
|
||||
:accepted => "activerecord_error_accepted",
|
||||
:empty => "activerecord_error_empty",
|
||||
:blank => "activerecord_error_blank",
|
||||
:too_long => "activerecord_error_too_long",
|
||||
:too_short => "activerecord_error_too_short",
|
||||
:wrong_length => "activerecord_error_wrong_length",
|
||||
:taken => "activerecord_error_taken",
|
||||
:not_a_number => "activerecord_error_not_a_number"
|
||||
}
|
||||
|
||||
ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" }
|
||||
@@ -0,0 +1,5 @@
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
|
||||
Mime::SET << Mime::CSV unless Mime::SET.include?(Mime::CSV)
|
||||
Mime::Type.register 'application/pdf', :pdf
|
||||
Mime::Type.register 'image/png', :png
|
||||
@@ -0,0 +1,7 @@
|
||||
GLoc.set_config :default_language => :en
|
||||
GLoc.clear_strings
|
||||
GLoc.set_kcode
|
||||
GLoc.load_localized_strings
|
||||
GLoc.set_config(:raise_string_not_found_errors => false)
|
||||
|
||||
require 'redmine'
|
||||
@@ -0,0 +1,17 @@
|
||||
# Loads action_mailer settings from email.yml
|
||||
# and turns deliveries on if configuration file is found
|
||||
|
||||
filename = File.join(File.dirname(__FILE__), '..', 'email.yml')
|
||||
if File.file?(filename)
|
||||
mailconfig = YAML::load_file(filename)
|
||||
|
||||
if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env)
|
||||
# Enable deliveries
|
||||
ActionMailer::Base.perform_deliveries = true
|
||||
|
||||
mailconfig[Rails.env].each do |k, v|
|
||||
v.symbolize_keys! if v.respond_to?(:symbolize_keys!)
|
||||
ActionMailer::Base.send("#{k}=", v)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user