Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

prototype-ujs: change function scope

#4724

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.

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

State: new
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. Justin Baker
    Justin Baker

    +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.* ?

    May 31st, 2010 @ 05:31 PM

  2. Justin Baker
    Justin Baker

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

    May 31st, 2010 @ 08:45 PM

  3. josh
    josh
    • State changed from new to invalid

    -1

    those functions are designed to be private

    June 8th, 2010 @ 09:18 PM