Permalink
Browse files

Fix problem with g.createLink() from controller actions.

  • Loading branch information...
pledbrook committed Mar 20, 2012
1 parent 477f7c9 commit 3d9d1dab87648b016b4f5afa2873353b3a06455e
@@ -12,7 +12,7 @@ class StatusController {
def index() {
def currentUser = lookupPerson()
def messages = statusService.currentTimeline(currentUser.id)
- [statusMessages: messages, currentUser: currentUser, moreMessagesUrl: g.createLink(action: "fetchMessagesForUser")]
+ [statusMessages: messages, currentUser: currentUser, moreMessagesAction: "fetchMessagesForUser"]
}
def tag() {
@@ -22,7 +22,8 @@ class StatusController {
[tag: params.id,
statusMessages: messages,
currentUser: currentUser,
- moreMessagesUrl: g.createLink(action: "fetchMessagesForTag", id: params.id)]
+ moreMessagesAction: "fetchMessagesForTag",
+ moreMessagesId: params.id]
}
def updateStatus() {
@@ -34,7 +34,7 @@ document.observe("dom:loaded", function() {
$('moreLink').observe('click', function(event) {
new Ajax.Updater(
'messages',
- '${moreMessagesUrl}',
+ '${createLink(action: moreMessagesAction, id: moreMessagesId)}',
{asynchronous:true,
parameters:'max=' + maxMessages,
onLoading: function() { $('moreSpinner').show(); },

0 comments on commit 3d9d1da

Please sign in to comment.