paloma 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Changelog.md +4 -0
- data/lib/paloma/action_controller_extension.rb +16 -16
- data/paloma.gemspec +1 -1
- metadata +3 -3
data/Changelog.md
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
module Paloma
|
2
2
|
|
3
3
|
# TODO explain!
|
4
|
-
module ::ActionController::
|
4
|
+
module ::ActionController::Flash
|
5
5
|
alias_method :original_redirect_to, :redirect_to
|
6
6
|
end
|
7
7
|
|
8
|
-
|
8
|
+
|
9
9
|
|
10
10
|
module ActionControllerExtension
|
11
|
-
def redirect_js_hook options = {},
|
11
|
+
def redirect_js_hook options = {}, response_status_and_flash = {}
|
12
12
|
add_to_callbacks @__paloma_callback__
|
13
|
-
original_redirect_to options,
|
14
|
-
end
|
13
|
+
original_redirect_to options, response_status_and_flash
|
14
|
+
end
|
15
15
|
alias_method :redirect_to, :redirect_js_hook
|
16
|
-
|
17
|
-
|
16
|
+
|
17
|
+
|
18
18
|
#
|
19
19
|
# js false
|
20
20
|
# js :new, :params => {}
|
@@ -24,31 +24,31 @@ module Paloma
|
|
24
24
|
def js options = {}, extras = {}
|
25
25
|
callback = {:controller => controller_path, :action => action_name}
|
26
26
|
params = {}
|
27
|
-
|
27
|
+
|
28
28
|
if options.is_a? Hash
|
29
29
|
params = options[:params]
|
30
|
-
callback = options[:controller].present? && options[:action].present? ?
|
30
|
+
callback = options[:controller].present? && options[:action].present? ?
|
31
31
|
{:controller => options[:controller], :action => options[:action]} :
|
32
32
|
callback
|
33
33
|
|
34
34
|
elsif options.is_a? Symbol
|
35
|
-
params = extras[:params]
|
35
|
+
params = extras[:params]
|
36
36
|
callback[:action] = options
|
37
|
-
|
37
|
+
|
38
38
|
elsif options.is_a? FalseClass
|
39
39
|
callback = nil
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
params ||= {}
|
43
|
-
|
43
|
+
|
44
44
|
# Include request details
|
45
45
|
params[:controller_path] = controller_path
|
46
46
|
params[:action] = action_name
|
47
|
-
|
47
|
+
|
48
48
|
@__paloma_callback__ = callback.present? ? callback.merge({:params => params}) : nil
|
49
|
-
end
|
49
|
+
end
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
|
53
53
|
::ActionController::Base.send :include, ActionControllerExtension
|
54
54
|
end
|
data/paloma.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'paloma'
|
3
|
-
s.version = '2.0.
|
3
|
+
s.version = '2.0.6'
|
4
4
|
s.summary = "Provides an easy way to execute page-specific javascript for Rails."
|
5
5
|
s.description = "Page-specific javascript for Rails done right"
|
6
6
|
s.authors = ["Karl Paragua", "Bia Esmero"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paloma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-05-
|
13
|
+
date: 2013-05-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: jquery-rails
|
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
240
|
version: '0'
|
241
241
|
requirements: []
|
242
242
|
rubyforge_project:
|
243
|
-
rubygems_version: 1.8.
|
243
|
+
rubygems_version: 1.8.21
|
244
244
|
signing_key:
|
245
245
|
specification_version: 3
|
246
246
|
summary: Provides an easy way to execute page-specific javascript for Rails.
|