Skip to content
Browse files

missed commits

  • Loading branch information...
1 parent 74c8538 commit 5e0592b413c29eb9003f8e06229f2e646cb5466c @jmmastey jmmastey committed
Showing with 27 additions and 3 deletions.
  1. +10 −1 README.md
  2. +4 −0 app/controllers/tilde_controller.rb
  3. +1 −0 app/models/user.rb
  4. +1 −1 config/initializers/session_store.rb
  5. +11 −1 db/schema.rb
View
11 README.md
@@ -4,4 +4,13 @@ Spawns a script/console-like console from your browser, which can communicate wi
the rails server as if it were in a controller action.
== Demo
-Start rails and head to the root of the app to demo.
+Start rails and navigate to the root of the app to demo.
+
+== Known Issues
+* The magical underscore variable `_` doesn't work yet.
+* the session and request objects for the console are not updated for the contents of future requests
+
+== Roadmap
+* session reloading support
+* execution in other controller contexts (users_controller, etc)
+* gemification
View
4 app/controllers/tilde_controller.rb
@@ -25,6 +25,10 @@ def port_used?(port)
false
end
+ def reload_session
+ session = ActiveRecord::SessionStore::Session.last
+ end
+
def port
if session[:tilde_port].nil?
p = nil
View
1 app/models/user.rb
@@ -1,3 +1,4 @@
class User < ActiveRecord::Base
attr_accessible :description, :id, :name
+ validates_presence_of :description, :id, :name
end
View
2 config/initializers/session_store.rb
@@ -1,6 +1,6 @@
# Be sure to restart your server when you modify this file.
-Tilde::Application.config.session_store :cookie_store
+Tilde::Application.config.session_store :active_record_store
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
View
12 db/schema.rb
@@ -11,7 +11,17 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120420161710) do
+ActiveRecord::Schema.define(:version => 20120420175517) do
+
+ create_table "sessions", :force => true do |t|
+ t.string "session_id", :null => false
+ t.text "data"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
+ add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
create_table "users", :force => true do |t|
t.string "name"

0 comments on commit 5e0592b

Please sign in to comment.
Something went wrong with that request. Please try again.