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

Changeset 5487

Show
Ignore:
Timestamp:
11/11/06 18:29:11 (2 years ago)
Author:
sam
Message:

Remove JavaScriptLiteral in favor of ActiveSupport::JSON::Variable.

Files:

Legend:

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

    r5482 r5487  
    11*SVN* 
     2 
     3* Remove JavaScriptLiteral in favor of ActiveSupport::JSON::Variable. [Sam Stephenson] 
    24 
    35* Sync ActionController::StatusCodes::STATUS_CODES with http://www.iana.org/assignments/http-status-codes.  #6586 [dkubb] 
  • trunk/actionpack/lib/action_view/helpers/prototype_helper.rb

    r5438 r5487  
    392392          # expression as an argument to another JavaScriptGenerator method. 
    393393          def literal(code) 
    394             JavaScriptLiteral.new(code
     394            ActiveSupport::JSON::Variable.new(code.to_s
    395395          end 
    396396           
     
    686686        end 
    687687        callbacks 
    688       end 
    689     end 
    690  
    691     # Bypasses string escaping so you can pass around raw JavaScript 
    692     class JavaScriptLiteral < String #:nodoc: 
    693       def to_json 
    694         to_s 
    695688      end 
    696689    end