Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4008

Show
Ignore:
Timestamp:
03/21/06 20:07:41 (2 years ago)
Author:
marcel
Message:

Make all ActionView helpers available in the console for debugging purposes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/CHANGELOG

    r3995 r4008  
    11*SVN* 
     2 
     3* Make all ActionView helpers available in the console for debugging purposes.  n.b.: Only an 80% solution. Some stuff won't work, most will. [Marcel Molina Jr.] 
     4 
     5  ex. 
     6 
     7    >> puts options_for_select([%w(a 1), %w(b 2), %w(c 3)]) 
     8    <option value="1">a</option> 
     9    <option value="2">b</option> 
     10    <option value="3">c</option> 
     11    => nil 
    212 
    313* Replaced old session rake tasks with db:sessions:create to generate a migration, and db:sessions:clear to remove sessions. [Rick Olson] 
  • trunk/railties/lib/commands/console.rb

    r3717 r4008  
    1414libs << " -r console_app" 
    1515libs << " -r console_sandbox" if options[:sandbox] 
     16libs << " -r console_with_helpers" 
    1617 
    1718ENV['RAILS_ENV'] = ARGV.first || ENV['RAILS_ENV'] || 'development'