From 91968e54e66d280b31ea3cbf0ed3c4fdeebb1cab Mon Sep 17 00:00:00 2001 From: kbparagua Date: Mon, 25 Mar 2013 14:19:15 +0800 Subject: [PATCH] 1.2.6 - hook script not appended on response when js_callback(false) --- Changelog.md | 4 ++++ lib/paloma/action_controller_filters.rb | 2 ++ paloma.gemspec | 2 +- spec/test_app/log/development.log | 4 ++++ .../sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 | Bin 0 -> 423 bytes .../sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 | Bin 0 -> 423 bytes 6 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 spec/test_app/log/development.log create mode 100644 spec/test_app/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 create mode 100644 spec/test_app/tmp/cache/assets/E25/4C0/sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 diff --git a/Changelog.md b/Changelog.md index ea8ee1b..a734aad 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,10 @@ Changelog = +Version 1.2.6 +- +* Paloma hook script is not appended on the response when `false` is passed to `js_callback` + Version 1.2.0 - * AddGenerator with multiple actions: `rails g paloma:add namespace/controller action1 action2 action3` diff --git a/lib/paloma/action_controller_filters.rb b/lib/paloma/action_controller_filters.rb index b3694d7..77cf196 100644 --- a/lib/paloma/action_controller_filters.rb +++ b/lib/paloma/action_controller_filters.rb @@ -18,6 +18,8 @@ module Paloma def update_callback + return clear_callbacks if @__callback__.nil? + add_to_callbacks @__callback__, @__js_params__ paloma_txt = view_context.render( diff --git a/paloma.gemspec b/paloma.gemspec index cb1ce69..8da0245 100644 --- a/paloma.gemspec +++ b/paloma.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'paloma' - s.version = '1.2.5' + s.version = '1.2.6' 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"] diff --git a/spec/test_app/log/development.log b/spec/test_app/log/development.log new file mode 100644 index 0000000..2a7a4bd --- /dev/null +++ b/spec/test_app/log/development.log @@ -0,0 +1,4 @@ + + +Started GET "/assets/rails.png" for 127.0.0.1 at 2013-02-21 18:47:46 +0800 +Served asset /rails.png - 200 OK (5ms) diff --git a/spec/test_app/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 b/spec/test_app/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 new file mode 100644 index 0000000000000000000000000000000000000000..8d1688dc058a73d8726dd7ca522a30f158181d41 GIT binary patch literal 423 zcmYk1L2JT55QWt``2oF~_v=>YtH1QRDu=pm%l3S+^oA=7R;!sq+xFX) zo80B)Rx8L;19sPp1{LVMo|t0m^m^&_&sG6@Z0wiksw}M!#`q45w)XWNwpjcB*Un^B z78VPe+LQTR9bA%rLw1qw-s(T>BMnG64(OPYHHjr7k_E3pEQ6q_?d4c(n-lfT_rucb zW!kk~-ta~Vjgc#05XAyA#)#lRBBFSdL`fDC_eFZds@7$3#(5(VMPkEa0xYBn(j?&_ ML6UI_z>_$nKlICY(*OVf literal 0 HcmV?d00001 diff --git a/spec/test_app/tmp/cache/assets/E25/4C0/sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 b/spec/test_app/tmp/cache/assets/E25/4C0/sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 new file mode 100644 index 0000000000000000000000000000000000000000..e147abaa27d71bef554bbd2c6f2f01bc7eaf315f GIT binary patch literal 423 zcmYk1&1=Fy5XIXfVim=nN-w2^+Dp-7H`z_HrJxiA&w3BTW{eB@SdvvL{l9zeYFg;= z&3p5EGo4-~o)*%mBW?~_SG5u11LPisSeB+f-HP#CR)wyyX)s+`g`Zkkm8jA?do_Z= zGy$`_Cq5@Z;B(Grj8PtiTny$%$Peh;ykB>EU&FQ2mpL>|S9F)FwKLurFiI{g+H~Kp z?Bp)5G9@8TG?;xm8r7ikW~R%`>h0PYo~;rJZ0(olx~hx|TDumErg2pP88+_!wKG{( zrNPo9=A?gDN0+4Al5M1481;vJq#p679-UIMC6Ne-2)tJ>5}w!A4stBB_C$5_{jhch zsj{t?H=IdKBV-Z+2qO+@5D?CQghaA14&yW;_KW0*b)%~CjB_SD4Ec^l1OlJNNaL9K N1WC#$0E;7^{s8!>ch&#^ literal 0 HcmV?d00001