This project is archived and is in readonly mode.

#4724 new
Deleted User

prototype-ujs: change function scope

Reported by Deleted User | May 29th, 2010 @ 03:27 PM

Wouldn't it be better to get alle the rails ujs functions out of the dom:loaded scope? This way, developers can access those functions from outside the rails.js dom:loaded scope.

Comments and changes to this ticket

  • Justin Baker

    Justin Baker May 31st, 2010 @ 05:31 PM

    +1

    I needed to put handleRemote to in the global scope to let me submit a form remotely when a checkbox is checked.
    Should it be something like Prototype.Rails.* ?

  • Justin Baker

    Justin Baker May 31st, 2010 @ 08:45 PM

    Here's a patch, handlers are now copied to global scope, so you can call Prototype.Rails.handleRemote, Prototype.Rails.handleMethod

  • josh

    josh June 8th, 2010 @ 09:18 PM

    • State changed from “new” to “invalid”

    -1

    those functions are designed to be private

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages