Permalink
Commits on Sep 22, 2016
  1. bump to 4.2.7

    committed Sep 22, 2016
  2. Merge pull request #89 from JackDanger/validate_present_of_parent

    Validate present of parent
    committed on GitHub Sep 22, 2016
  3. Merge pull request #87 from JackDanger/remove_deprecation

    Remove deprecation
    committed on GitHub Sep 22, 2016
Commits on Sep 6, 2016
  1. Add case of revival children first

    joel committed Sep 6, 2016
  2. Fix default scope issue

    joel committed Sep 6, 2016
  3. When parent can't see children

    joel committed Sep 6, 2016
  4. Extract method destroyed_dependent_relations

    joel committed Sep 6, 2016
  5. Remove Deprecation

    joel committed Sep 6, 2016
  6. Update to Rspec 3

    joel committed Sep 6, 2016
Commits on Jul 7, 2016
  1. bumping to 4.1.7

    and using a safer publish command so I don't forget to push to github next time
    committed Jul 7, 2016
  2. bump version to 4.1.6

    committed Jun 6, 2016
Commits on Jun 17, 2016
  1. Merge pull request #78 from drakmail/polymorphic_counter_cache

    Fix issues with polymorphic associations with counter_cache
    committed on GitHub Jun 17, 2016
Commits on Jun 9, 2016
Commits on Jun 6, 2016
  1. Merge pull request #74 from drakmail/counter_cache

    Implemented a counter cache support
    committed Jun 6, 2016
Commits on Jun 2, 2016
  1. Implement counter cache

    drakmail committed Jun 2, 2016
Commits on Apr 19, 2016
  1. bumping version to 4.1.5

    committed Apr 19, 2016
  2. Merge pull request #70 from aq/fix_for_sti_tables

    Fixes a bug for single table inheritence
    committed Apr 19, 2016
  3. Fixes a bug for single table inheritence

    Those lines replaced all the attributes of a record during a soft destroy:
    * https://github.com/JackDanger/permanent_records/blob/b681ccf1ec2bc12e5004d14e792e3b193a08acb7/lib/permanent_records.rb#L87
    * https://github.com/JackDanger/permanent_records/blob/b681ccf1ec2bc12e5004d14e792e3b193a08acb7/lib/permanent_records.rb#L78
    * https://github.com/JackDanger/permanent_records/blob/b681ccf1ec2bc12e5004d14e792e3b193a08acb7/lib/permanent_records.rb#L99
    Example:
    ```ruby
    class Branche < ActiveRecord::Base
      include ActiveRecord::SoftDestroyable
      has_many :sub_branches, foreign_key: 'parent_id', class_name: 'Branche'
      belongs_to :main_branche, foreign_key: 'parent_id', class_name: 'Branche'
    end
    main_branche = Branche.create
    main_branche.id # => 1
    sub_branche = Branche.create parent_id: main_branche.id
    sub_branche.id # => 2
    sub_branche.destroy!
    sub_branche.id # => ! 1 in place of 2
     # because the instance attributes have been replaced.
    ```
    
    The spec was a false positive because the relation between hole and
    location is `has_one` not `has_many`:
    * https://github.com/JackDanger/permanent_records/blob/b681ccf1ec2bc12e5004d14e792e3b193a08acb7/spec/permanent_records/circular_sti_dependency_spec.rb#L6-L8
    * https://github.com/JackDanger/permanent_records/blob/b681ccf1ec2bc12e5004d14e792e3b193a08acb7/spec/support/hole.rb#L12
    aq committed Apr 19, 2016
Commits on Apr 8, 2016
  1. Merge pull request #69 from Seraff/patch-1

    Error in revive callback, resolves #53
    committed Apr 8, 2016
  2. Error in revive callback, resolves #53

    Reviving crashes after a custom after_revive callback defined.
    Seraff committed Apr 8, 2016
Commits on Feb 26, 2016
  1. fixing rubocop violation

    committed Feb 26, 2016
  2. bumping version: 4.1.3

    committed Feb 26, 2016
  3. bump version to 4.1.2

    committed Feb 2, 2016
  4. Now with color

    committed Feb 2, 2016
  5. fixing RSpec task

    committed Feb 2, 2016
  6. Merge pull request #68 from gsmetal/patch-1

    Not trigger ActiveRecord loading on requiring gem
    committed Feb 26, 2016
  7. Not trigger ActiveRecord loading on requiring gem

    When this gem required ActiveRecord::Base triggered to load and make connections to database. This should not be due to (for example) failing assets:precomplie in Heroku (https://devcenter.heroku.com/articles/rails-asset-pipeline#troubleshooting), where build phase and run phase are separated and database is not available on build phase.
    gsmetal committed Feb 26, 2016
Commits on Feb 2, 2016
  1. showing output in Rubocop

    committed Feb 2, 2016
  2. bump version 4.1.1

    committed Feb 2, 2016
  3. Merge pull request #67 from JackDanger/danger/rubocop

    Adding Rubocop
    committed Feb 2, 2016