Created
January 23, 2010 04:28
-
-
Save dewski/284427 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def post_process #:nodoc: | |
| return if @queued_for_write[:original].nil? | |
| # This line below causes the first line of fire_events to return true, which stops the post_process_styles | |
| # I can't figure out what before_post_process does | |
| return if fire_events(:before) | |
| post_process_styles | |
| return if fire_events(:after) | |
| end | |
| def fire_events(which) #:nodoc: | |
| return true if callback(:"#{which}_post_process") == false | |
| return true if callback(:"#{which}_#{name}_post_process") == false | |
| end | |
| def callback which #:nodoc: | |
| instance.run_callbacks(which, @queued_for_write){|result, obj| result == false } | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment