Skip to content

Instantly share code, notes, and snippets.

@dewski
Created January 23, 2010 04:28
Show Gist options
  • Select an option

  • Save dewski/284427 to your computer and use it in GitHub Desktop.

Select an option

Save dewski/284427 to your computer and use it in GitHub Desktop.
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