volt 0.7.8 → 0.7.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74ea3a341b93854eef0a8477634b7b21a88c289c
4
- data.tar.gz: 92d8ffbdd68245f528c522528adc8e78d873ccbb
3
+ metadata.gz: e87f1f36692afdd5cdad52e721ac7ec625fe9b9f
4
+ data.tar.gz: 6a65a3645c90dc84ce1f4b2ec312131e568bf69a
5
5
  SHA512:
6
- metadata.gz: 562ad2af2497878707f9259d16fd2c5983e19aad385b9048e81d399467953e20ad0302d1404bd88fa7c5fbd8de29d872202f5854ae6a292a88fd329f9b4dc99d
7
- data.tar.gz: 09d8dfcf71e4995e0983a52fb1169f0153dccbc21d0ce72cd5bdb73b5a25c0a702afab9d50ed72a8a53bdb5588f9a6e7536d9220bd329755cf5220dbef9886db
6
+ metadata.gz: 16b975911873f5c27bbd599c87a6b468a86033d23bca9c967e8079413cc1ccb5d49d02f81c909e2c596fa839706921983725efbb2b447f1b0279d47a4cef0092
7
+ data.tar.gz: 81d8ae70450c84e6c19b9f35b27146b8a42a5722385ed59ccd954ab1f4d6ddf1728021118a6471292c97f3aa32b30f8673e3764b212c8886e3edbbb40fd791ae
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.8
1
+ 0.7.9
data/lib/volt/models.rb CHANGED
@@ -8,3 +8,10 @@ require 'volt/models/persistors/model_store'
8
8
  require 'volt/models/persistors/params'
9
9
  require 'volt/models/persistors/flash'
10
10
  require 'volt/models/persistors/local_store'
11
+ if RUBY_PLATFORM == 'opal'
12
+ require 'promise.rb'
13
+ else
14
+ # Opal doesn't expose its promise library directly
15
+ spec = Gem::Specification.find_by_name("opal")
16
+ require(spec.gem_dir + "/stdlib/promise")
17
+ end
@@ -265,6 +265,9 @@ class Model
265
265
 
266
266
 
267
267
  def save!
268
+ # Compute the erros once
269
+ errors = self.errors
270
+
268
271
  if errors.size == 0
269
272
  save_to = options[:save_to]
270
273
  if save_to
@@ -108,6 +108,7 @@ class URL
108
108
  }
109
109
  console.log('found anchor: ', anchor);
110
110
  if (anchor && anchor.length > 0) {
111
+ console.log('scroll to: ', anchor.offset().top);
111
112
  $(document.body).scrollTop(anchor.offset().top);
112
113
  }
113
114
  }
@@ -173,6 +173,12 @@ class TemplateBinding < BaseBinding
173
173
 
174
174
  def call_ready
175
175
  if @controller
176
+ # Set the current section on the controller if it wants so it can manipulate
177
+ # the dom if needed
178
+ if @controller.respond_to?(:section=)
179
+ @controller.section = @current_template.section
180
+ end
181
+
176
182
  if @controller.respond_to?(:dom_ready)
177
183
  @controller.dom_ready
178
184
  end
@@ -30,13 +30,6 @@ require 'volt/benchmark/benchmark'
30
30
  require 'volt/page/draw_cycle'
31
31
  require 'volt/page/tasks'
32
32
 
33
- if RUBY_PLATFORM == 'opal'
34
- require 'promise.rb'
35
- else
36
- # Opal doesn't expose its promise library directly
37
- spec = Gem::Specification.find_by_name("opal")
38
- require(spec.gem_dir + "/stdlib/promise")
39
- end
40
33
 
41
34
 
42
35
  class Page
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.8
4
+ version: 0.7.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-15 00:00:00.000000000 Z
11
+ date: 2014-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor