-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark record as changed, if a deferred association is updated. This al…
…lows us to use the :autosave option as well Bump version to 0.6.0
- Loading branch information
Martin Körner
committed
May 6, 2016
1 parent
82c7610
commit 1767316
Showing
11 changed files
with
93 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
DIR=`pwd` | ||
|
||
if [[ $DIR == *bin ]]; then | ||
cd .. | ||
fi | ||
|
||
echo "Your ruby version: " | ||
echo `ruby -v` | ||
|
||
ls -c gemfiles/*.gemfile | while read line | ||
do | ||
|
||
echo "Run Spec for gemfile: $line" | ||
export BUNDLE_GEMFILE=$line | ||
bundle install | ||
bundle exec rspec | ||
echo "" | ||
echo "" | ||
echo "" | ||
echo "=========" | ||
done | ||
|
||
unset BUNDLE_GEMFILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ | |
|
||
Gem::Specification.new do |s| | ||
s.name = 'deferred_associations' | ||
s.version = '0.5.8' | ||
s.version = '0.6.0' | ||
|
||
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version= | ||
s.authors = ['Martin Koerner', 'Tyler Rick', 'Alessio Caiazza'] | ||
s.date = '2016-03-08' | ||
s.date = '2016-05-06' | ||
s.description = "Makes ActiveRecord defer/postpone saving the records you add to an habtm (has_and_belongs_to_many) or has_many\n association until you call model.save, allowing validation in the style of normal attributes. Additionally you\n can check inside before_save filters, if the association was altered." | ||
s.email = '[email protected]' | ||
s.licenses = 'MIT' | ||
|
@@ -20,6 +20,7 @@ Gem::Specification.new do |s| | |
'VERSION', | ||
'deferred_associations.gemspec', | ||
'init.rb', | ||
'bin/run_all_specs', | ||
'lib/array_to_association_wrapper.rb', | ||
'lib/deferred_associations.rb', | ||
'lib/has_and_belongs_to_many_with_deferred_save.rb', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
class Table < ActiveRecord::Base | ||
|
||
belongs_to :room | ||
belongs_to :room_with_autosave, class_name: 'Room', autosave: true, foreign_key: 'room_id' | ||
has_many_with_deferred_save :chairs | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Window < ActiveRecord::Base | ||
|
||
belongs_to :room | ||
end |