From 767d7444d201b5be20998e19dc980e4a3947ca63 Mon Sep 17 00:00:00 2001 From: yasushiito Date: Tue, 3 Jan 2012 13:12:32 +0900 Subject: [PATCH] update --- config/environments/development.rb | 1 - config/environments/production.rb | 1 + config/routes.rb | 2 ++ lib/picture_io.rb | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index bd57e43a..1f7eb0e5 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -30,7 +30,6 @@ Pettanr::Application.configure do # Expands the lines which load the assets config.assets.debug = true end -y = YAML.load(open(Rails.root + 'config/aws.yaml').read) require 'local_picture' PictureIO.setup do |config| diff --git a/config/environments/production.rb b/config/environments/production.rb index 71c356d6..25028e67 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -71,4 +71,5 @@ require 's3_picture' PictureIO.setup do |config| config.original_picture_io = PictureIO::S3Picture.new 'pettanr-original' config.resource_picture_io = PictureIO::S3Picture.new 'pettanr-stable' + config.system_picture_io = PictureIO::S3Picture.new 'pettanr-system' end diff --git a/config/routes.rb b/config/routes.rb index 0e0b2c65..fe47bc6d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -19,6 +19,7 @@ Pettanr::Application.routes.draw do resources :lisences, only: [:index] resources :original_lisences resources :common_lisences + resources :system_pictures, except: [:new, :edit] # The priority is based upon order of creation: # first created -> highest priority. @@ -32,6 +33,7 @@ Pettanr::Application.routes.draw do match 'help/(:action)', :controller => 'help' controller 'system' do get 'start' + get 'index' # match 'start', :to => 'system#start' end diff --git a/lib/picture_io.rb b/lib/picture_io.rb index 5ca26629..df49d0e7 100644 --- a/lib/picture_io.rb +++ b/lib/picture_io.rb @@ -1,6 +1,7 @@ class PictureIO @@resource_picture_io #= LocalPicture.new @@original_picture_io #= LocalPicture.new Rails.root + 'original' + @@system_picture_io #= LocalPicture.new Rails.root + 'system' def self.original_picture_io @@original_picture_io @@ -18,6 +19,14 @@ class PictureIO @@resource_picture_io = pclass end + def self.system_picture_io + @@system_picture_io + end + + def self.system_picture_io=(pclass) + @@system_picture_io = pclass + end + def self.setup yield self end -- 2.11.0