hammock 0.3.10.3 → 0.3.10.4

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/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.10.4 2009-07-29
2
+ Temporary fix: re-fetch records in find_record_on_create to avoid readonly errors.
3
+
4
+
1
5
  == 0.3.10.3 2009-07-20
2
6
  scope_for_route considers user and public scopes when authed now.
3
7
 
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.3.10.3"
5
+ s.version = "0.3.10.4"
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-07-20}
9
+ s.date = %q{2009-07-29}
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
 
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.3.10.3'
7
+ VERSION = '0.3.10.4'
8
8
  IncludeTarget = ActionController::Base
9
9
 
10
10
  def self.included base # :nodoc:
@@ -131,7 +131,7 @@ module Hammock
131
131
  if findable_on_create?
132
132
  if record = mdl.ambition_context.within(current_nest_scope).find(:first, :conditions => params_for(mdl.symbolize))
133
133
  log "Suitable #{record.class}<#{record.id}> already exists."
134
- assign_entity record
134
+ assign_entity mdl.resource.find record.id
135
135
  else
136
136
  log "Couldn't find a suitable #{mdl}, proceeding with creation."
137
137
  end
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.3.10.3
4
+ version: 0.3.10.4
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-07-20 00:00:00 +10:00
12
+ date: 2009-07-29 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency