hat-trick 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +3 -0
- data/README.md +2 -2
- data/app/assets/javascripts/hat-trick.js.coffee +3 -2
- data/lib/hat_trick/controller_hooks.rb +1 -0
- data/lib/hat_trick/version.rb +1 -1
- metadata +2 -8
data/Changelog
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
* 0.1.4 - Make the rails env available in JS as window.hatTrick.railsEnv
|
2
|
+
- Only output console log messages in development env
|
3
|
+
|
1
4
|
* 0.1.3 - The "production" release. TurboVote.org runs on this version.
|
2
5
|
- Handle non-root URLs correctly in pushState (Closes GH issue #5)
|
3
6
|
- Don't loop past the last step when looking for the next one (Closes GH issue #6)
|
data/README.md
CHANGED
@@ -22,8 +22,8 @@ In your controller:
|
|
22
22
|
step :third_step
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
|
-
containing the model instance you're building in the wizard
|
25
|
+
**Make sure your controller's CRUD methods know how to return JSON responses
|
26
|
+
containing the model instance you're building in the wizard.**
|
27
27
|
|
28
28
|
In your view:
|
29
29
|
|
@@ -5,7 +5,8 @@ class HatTrickWizard
|
|
5
5
|
@form = $(formElem)
|
6
6
|
this.enableFormwizard()
|
7
7
|
|
8
|
-
debug:
|
8
|
+
debug: ->
|
9
|
+
window.hatTrick.railsEnv == "development"
|
9
10
|
|
10
11
|
linkClass: "_ht_link"
|
11
12
|
|
@@ -454,5 +455,5 @@ underscoreString = (string) ->
|
|
454
455
|
result
|
455
456
|
|
456
457
|
log = (msg) ->
|
457
|
-
if window['console']? and hatTrick.wizard.debug
|
458
|
+
if window['console']? and hatTrick.wizard.debug()
|
458
459
|
console.log msg
|
@@ -71,6 +71,7 @@ module HatTrick
|
|
71
71
|
gon.metadata = wizard_metadata
|
72
72
|
gon.data = include_data
|
73
73
|
gon.model = hat_trick_wizard.model
|
74
|
+
gon.rails_env = Rails.env
|
74
75
|
|
75
76
|
# this sets the wizard metadata for subsequent AJAX requests
|
76
77
|
if hat_trick_wizard.model && rendered.has_key?(:json)
|
data/lib/hat_trick/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hat-trick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -167,18 +167,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
167
|
- - ! '>='
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
|
-
segments:
|
171
|
-
- 0
|
172
|
-
hash: -343326183574919333
|
173
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
171
|
none: false
|
175
172
|
requirements:
|
176
173
|
- - ! '>='
|
177
174
|
- !ruby/object:Gem::Version
|
178
175
|
version: '0'
|
179
|
-
segments:
|
180
|
-
- 0
|
181
|
-
hash: -343326183574919333
|
182
176
|
requirements: []
|
183
177
|
rubyforge_project: hat-trick
|
184
178
|
rubygems_version: 1.8.23
|