Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added class to store the selected files in a yaml file located in the…
… tmp directory. Removed the AR session configuration and removed the database migration for it.
- Loading branch information
Matthew Savage
authored and
Matthew Savage
committed
Aug 15, 2009
1 parent
8de3a7c
commit 83c948d
Showing
5 changed files
with
37 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +0,0 @@ | ||
# This file is auto-generated from the current state of the database. Instead of editing this file, | ||
# please use the migrations feature of Active Record to incrementally modify your database, and | ||
# then regenerate this schema definition. | ||
# | ||
# Note that this schema.rb definition is the authoritative source for your database schema. If you need | ||
# to create the application database on another system, you should be using db:schema:load, not running | ||
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations | ||
# you'll amass, the slower it'll run and the greater likelihood for issues). | ||
# | ||
# It's strongly recommended to check this file into your version control system. | ||
|
||
ActiveRecord::Schema.define(:version => 20090815164634) do | ||
|
||
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class FileListStore | ||
def self.get_files | ||
f = YAML.load_file("#{RAILS_ROOT}/tmp/selected_files.yml") | ||
end | ||
|
||
def self.store_files(files) | ||
File.open("#{RAILS_ROOT}/tmp/selected_files.yml", "w") do |out| | ||
YAML.dump(files, out) | ||
end | ||
end | ||
|
||
def self.clear_files | ||
File.delete "#{RAILS_ROOT}/tmp/selected_files.yml" | ||
end | ||
end |