mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
Renamed application Pixelhum. Added DB session store.
This commit is contained in:
parent
91fb25781d
commit
9193bd107b
2
Rakefile
2
Rakefile
@ -4,4 +4,4 @@
|
||||
|
||||
require File.expand_path('../config/application', __FILE__)
|
||||
|
||||
Abidownloads::Application.load_tasks
|
||||
Pixelhum::Application.load_tasks
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# This file is used by Rack-based servers to start the application.
|
||||
|
||||
require ::File.expand_path('../config/environment', __FILE__)
|
||||
run Abidownloads::Application
|
||||
run Pixelhum::Application
|
||||
|
||||
@ -9,7 +9,7 @@ if defined?(Bundler)
|
||||
# Bundler.require(:default, :assets, Rails.env)
|
||||
end
|
||||
|
||||
module Abidownloads
|
||||
module Pixelhum
|
||||
class Application < Rails::Application
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
# Application configuration should go into files in config/initializers
|
||||
|
||||
@ -2,4 +2,4 @@
|
||||
require File.expand_path('../application', __FILE__)
|
||||
|
||||
# Initialize the rails application
|
||||
Abidownloads::Application.initialize!
|
||||
Pixelhum::Application.initialize!
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Abidownloads::Application.configure do
|
||||
Pixelhum::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# In the development environment your application's code is reloaded on
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Abidownloads::Application.configure do
|
||||
Pixelhum::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# Code is not reloaded between requests
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Abidownloads::Application.configure do
|
||||
Pixelhum::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# The test environment is used exclusively to run your application's
|
||||
|
||||
@ -4,4 +4,4 @@
|
||||
# If you change this key, all old signed cookies will become invalid!
|
||||
# Make sure the secret is at least 30 characters and all random,
|
||||
# no regular words or you'll be exposed to dictionary attacks.
|
||||
Abidownloads::Application.config.secret_token = '0c32dab080a056a39d8f387a5ebef9f286b0d4c02f9d07bd3b59b4ab9ee09447538116ea3f4c66d66d4ef20229379ef3962a76ee8a878caa85af09c25a5239a0'
|
||||
Pixelhum::Application.config.secret_token = '0c32dab080a056a39d8f387a5ebef9f286b0d4c02f9d07bd3b59b4ab9ee09447538116ea3f4c66d66d4ef20229379ef3962a76ee8a878caa85af09c25a5239a0'
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
Abidownloads::Application.config.session_store :cookie_store, key: '_abidownloads_session'
|
||||
# Pixelhum::Application.config.session_store :cookie_store, key: '_abidownloads_session'
|
||||
|
||||
# Use the database for sessions instead of the cookie-based default,
|
||||
# which shouldn't be used to store highly confidential information
|
||||
# (create the session table with "rails generate session_migration")
|
||||
# Abidownloads::Application.config.session_store :active_record_store
|
||||
Pixelhum::Application.config.session_store :active_record_store
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Abidownloads::Application.routes.draw do
|
||||
Pixelhum::Application.routes.draw do
|
||||
as :admin_user do
|
||||
match '/admin_users/confirmation' => 'admin/confirmations#update', :via => :put, :as => :update_user_confirmation
|
||||
end
|
||||
|
||||
16
db/migrate/20111013085444_add_sessions_table.rb
Normal file
16
db/migrate/20111013085444_add_sessions_table.rb
Normal file
@ -0,0 +1,16 @@
|
||||
class AddSessionsTable < ActiveRecord::Migration
|
||||
def up
|
||||
create_table :sessions do |t|
|
||||
t.string :session_id, :null => false
|
||||
t.text :data
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :sessions, :session_id
|
||||
add_index :sessions, :updated_at
|
||||
end
|
||||
|
||||
def down
|
||||
drop_table :sessions
|
||||
end
|
||||
end
|
||||
12
db/schema.rb
12
db/schema.rb
@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20111007155450) do
|
||||
ActiveRecord::Schema.define(:version => 20111013085444) do
|
||||
|
||||
create_table "admin_users", :force => true do |t|
|
||||
t.string "email", :default => "", :null => false
|
||||
@ -58,4 +58,14 @@ ActiveRecord::Schema.define(:version => 20111007155450) do
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "sessions", :force => true do |t|
|
||||
t.string "session_id", :null => false
|
||||
t.text "data"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
|
||||
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
|
||||
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user