Skip to content

Commit

Permalink
missed commits
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmastey committed Apr 20, 2012
1 parent 74c8538 commit 5e0592b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions app/controllers/tilde_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
class User < ActiveRecord::Base
attr_accessible :description, :id, :name
validates_presence_of :description, :id, :name
end
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 11 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5e0592b

Please sign in to comment.