1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Bug Fix: prevent javascript error when callback doesn't exist.

This commit is contained in:
kbparagua 2013-04-01 22:27:43 +08:00
parent d53300a285
commit 6cbddce459
3 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,10 @@
Changelog
=
Version 2.0.3
-
* Bug Fix: prevent javascript error when callback doesn't exist.
Version 2.0.2
-
* 'js(false)' will prevent Paloma from appending _callback_hook on the response.

View file

@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'paloma'
s.version = '2.0.2'
s.version = '2.0.3'
s.summary = "Provides an easy way to execute page-specific javascript for Rails."
s.description = "Page-specific javascript for Rails done right"
s.authors = ["Karl Paragua", "Bia Esmero"]

View file

@ -199,9 +199,11 @@ Paloma.execute = function(controller, action, params){
var callback = Paloma.callbacks[controller];
callbackFound = callback != undefined;
callback = callback[action];
callbackFound = callback != undefined;
if (callbackFound){
callback = callback[action];
callbackFound = callback != undefined;
}
// Parse parameters
params = params || {};