edifice 0.6.2 → 0.6.3

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.
@@ -2,6 +2,7 @@
2
2
  module Edifice
3
3
  class Responder < ActionController::Responder
4
4
  protected
5
+ # add the :u_e header to xhr error requests
5
6
  def to_html
6
7
  if controller.request.xhr? && !get? and has_errors? && default_action
7
8
  render :action => default_action, :status => :unprocessable_entity, :layout => nil
@@ -9,5 +10,14 @@ module Edifice
9
10
  super
10
11
  end
11
12
  end
13
+
14
+ # actually render something on successful updates
15
+ def to_format
16
+ unless get? or has_errors? or post?
17
+ display resource, :status => :ok
18
+ else
19
+ super
20
+ end
21
+ end
12
22
  end
13
23
  end
@@ -1,3 +1,3 @@
1
1
  module Edifice
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -118,7 +118,7 @@ var methods = {
118
118
  }
119
119
 
120
120
  this.focus_error();
121
- } else if (x.status >= 500 && x.status < 600) {
121
+ } else if (request.status >= 500 && request.status < 600) {
122
122
  // a SERVER ERROR -- something unrecoverable happened on the server
123
123
  this.trigger('server_error', request, status, error);
124
124
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edifice
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 2
10
- version: 0.6.2
9
+ - 3
10
+ version: 0.6.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Coleman
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-06-29 00:00:00 +10:00
20
+ date: 2011-06-30 00:00:00 +10:00
21
21
  default_executable:
22
22
  dependencies: []
23
23