require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
-require "active_resource/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
require 'digest/md5'
-
+$: << './lib'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
-require 'manifest'
-Manifest::load JSON.parse(open(File.expand_path('../../public/manifest.json', __FILE__)).read)
module Pettanr
- VERSION = '0.6.2'
+ VERSION = '0.7.0'
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ I18n.enforce_available_locales = false
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
config.i18n.default_locale = :ja
y = YAML.load(open(Rails.root + 'config/picture_io.yml').read)
require y[Rails.env]["adapter"]
pio = PictureIO.const_get y[Rails.env]["io"]
+host_dir = y[Rails.env]["host_dir"]
PictureIO.setup do |config|
- config.original_picture_io = pio.new y[Rails.env]["original_picture"]
- config.resource_picture_io = pio.new y[Rails.env]["resource_picture"]
- config.picture_io = pio.new y[Rails.env]["picture"]
- config.system_picture_io = pio.new y[Rails.env]["system_picture"]
+ config.original_picture_io = pio.new host_dir, y[Rails.env]["original_picture"]
+ config.resource_picture_io = pio.new host_dir, y[Rails.env]["resource_picture"]
+ config.picture_io = pio.new host_dir, y[Rails.env]["picture"]
+ config.system_picture_io = pio.new host_dir, y[Rails.env]["system_picture"]
end
module ActiveRecord
class Forbidden < ActiveRecordError