hammock 0.2.20 → 0.2.21

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.2.21 2009-04-26
2
+ Added a rendered_or_redirected? check to the start of the non-XHR logic in #render_or_redirect_after.
3
+ Changed callback description to #identifier, to print the desc or method name instead of a #<Proc>.
4
+
5
+
1
6
  == 0.2.20 2009-04-24
2
7
  Fixed incorrect obj.siblings reference in #ajaxinate that was failing to find .statuses > .success.
3
8
 
data/hammock.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{hammock}
5
- s.version = "0.2.20"
5
+ s.version = "0.2.21"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ben Hoskings"]
9
- s.date = %q{2009-04-24}
9
+ s.date = %q{2009-04-26}
10
10
  s.description = %q{Hammock is a Rails plugin that eliminates redundant code in a very RESTful manner. It does this in lots in lots of different places, but in one manner: it encourages specification in place of implementation.
11
11
 
12
12
 
@@ -72,7 +72,7 @@ module Hammock
72
72
  callback_chain_for(kind).all? {|cb|
73
73
  # dlog "Calling #{kind} callback #{cb.method}"
74
74
  result = cb.call(self, *args) != CallbackFail
75
- log "#{self.class}.#{cb.kind} callback '#{cb.method}' failed." unless result
75
+ log "#{self.class}.#{cb.kind} callback '#{cb.identifier}' failed." unless result
76
76
  result
77
77
  }
78
78
  end
@@ -16,7 +16,9 @@ module Hammock
16
16
  if request.xhr?
17
17
  render_for_safe_actions result, :editable => true, :edit => false
18
18
  else
19
- if postsave_render result
19
+ if rendered_or_redirected?
20
+ log "Already rendered or redirected."
21
+ elsif postsave_render result
20
22
  # rendered - no redirect
21
23
  elsif result
22
24
  render_http_success
data/lib/hammock.rb CHANGED
@@ -4,7 +4,7 @@ require 'ambition'
4
4
  require 'ambition/adapters/active_record'
5
5
 
6
6
  module Hammock
7
- VERSION = '0.2.20'
7
+ VERSION = '0.2.21'
8
8
 
9
9
  def self.included base # :nodoc:
10
10
  puts "Loading Hammock from #{loaded_from_gem? ? 'gem' : 'plugin'}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.20
4
+ version: 0.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Hoskings
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-24 00:00:00 +10:00
12
+ date: 2009-04-26 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency