scheherazade 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -77,7 +77,8 @@ module Scheherazade
77
77
 
78
78
  def value_for_association(assoc, associated_character)
79
79
  log(:setting_assocation, associated_character)
80
- opts = {assoc.active_record.name.underscore.to_sym => @ar} if [:has_many, :has_one].include? assoc.macro
80
+ key = assoc.options[:as] || assoc.active_record.name.underscore.to_sym
81
+ opts = {key => @ar} if [:has_many, :has_one].include? assoc.macro
81
82
  ar = if associated_character.is_a?(Symbol)
82
83
  story.current[associated_character] || self.class.new(associated_character).build(opts)
83
84
  else
@@ -1,3 +1,3 @@
1
1
  module Scheherazade
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scheherazade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
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-07-09 00:00:00.000000000 Z
12
+ date: 2012-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: -3938852756057065504
94
+ hash: 3880802651756250805
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: -3938852756057065504
103
+ hash: 3880802651756250805
104
104
  requirements: []
105
105
  rubyforge_project:
106
106
  rubygems_version: 1.8.24