Skip to content

Commit

Permalink
adding callbacks should be private
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jun 11, 2013
1 parent 4909337 commit 0d3589e
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -19,6 +19,12 @@ def build
reflection
end

def valid_dependent_options
[:destroy, :delete]
end

private

def add_counter_cache_callbacks(reflection)
cache_column = reflection.counter_cache_column
foreign_key = reflection.foreign_key
Expand Down Expand Up @@ -92,9 +98,5 @@ def belongs_to_touch_after_save_or_destroy_for_#{name}
model.after_touch "belongs_to_touch_after_save_or_destroy_for_#{name}"
model.after_destroy "belongs_to_touch_after_save_or_destroy_for_#{name}"
end

def valid_dependent_options
[:destroy, :delete]
end
end
end

0 comments on commit 0d3589e

Please sign in to comment.