codegram / rack-webconsole

Rack-based interactive console (à la Rails console) for your web application's front-end
http://codegram.github.com/rack-webconsole
248 stars 50 forks source link

Running this in a Rails 2.3.18 application. #52

Open VarunNatraaj opened 10 years ago

VarunNatraaj commented 10 years ago

I am doing a simple Rails 2.3.18 application. I've put the gem 'rack-webconsole' in the Gemfile and run the bundle install. I've put the lines..

require 'rack/webconsole'

ActionController::Dispatcher.middleware.insert_after 1, Rack::Webconsole Rack::Webconsole.inject_jquery = true

..in my application's config/initializers/webconsole.rb. When i run the server and press ` while viewing the page in localhost, the console isnt firing up. Am i doing something wrong here, or does the console not support Rails 2.x.x apps?

VarunNatraaj commented 10 years ago

It works well :+1: Beau :)

Just one issue though, when am typing in the console with a form in the background, and i press enter to load the command into the console, the submit action is triggered on the form.. Any way to freeze background actions while working in the console?

P.S: The form has a JS code validating it and this gets triggered enter is pressed in the console.