1 # -*- coding: utf-8 -*-
2 # Be sure to restart your server when you modify this file
4 # Specifies gem version of Rails to use when vendor/rails is not present
5 #RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
7 # Bootstrap the Rails environment, frameworks, and default configuration
8 require File.join(File.dirname(__FILE__), 'boot')
11 Rails::Initializer.run do |config|
12 # Settings in config/environments/* take precedence over those specified here.
13 # Application configuration should go into files in config/initializers
14 # -- all .rb files in that directory are automatically loaded.
16 # Add additional load paths for your own custom dirs
17 # config.load_paths += %W( #{RAILS_ROOT}/extras )
19 # Specify gems that this application depends on and have them installed with rake gems:install
21 # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
22 # config.gem "sqlite3-ruby", :lib => "sqlite3"
23 # config.gem "aws-s3", :lib => "aws/s3"
25 # Only load the plugins named here, in the order given (default is alphabetical).
26 # :all can be used as a placeholder for all plugins not explicitly named
27 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
29 # Skip frameworks you're not going to use. To use Rails without a database,
30 # you must remove the Active Record framework.
31 # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
33 # Activate observers that should always be running
34 # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
36 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
37 # Run "rake -D time" for a list of tasks for finding time zone names.
38 #config.time_zone = 'UTC'
39 #config.time_zone = 'Tokyo'
40 config.active_record.default_timezone = 'Tokyo'
42 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
43 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
44 config.i18n.default_locale = 'ja'
46 config.action_controller.session = {:cookie_only => false}
51 delegate :file_exists?, :to => :finder unless respond_to?(:file_exists?)
55 require 'action_view_helper'
56 require 'active_record_helper'
57 require 'will_paginate'
59 require 'rexml-expansion-fix'
60 require 'create_fixtures'
61 require 'security_token'
63 require 'check_session_signature'
65 list = Dir["app/models/*.rb"]
67 model = Object.const_get(File.basename(i, '.rb').camelize)
68 if model.superclass == ActiveRecord::Base && model.table_exists?
73 # unsuported_device_mobile.html.erb で使用されるページネーションレンダラ
74 class UnsupportedDeviceLinkRenderer < WillPaginate::LinkRenderer
75 def page_link(page, text, attributes = {})
76 @template.link_to text, url_for(page), {}
79 def page_span(page, text, attributes = {})
80 # @template.content_tag :span, text, {}