lib/trestle/configuration.rb in trestle-0.8.12 vs lib/trestle/configuration.rb in trestle-0.8.13
- old
+ new
@@ -82,14 +82,14 @@
def form_field(name, klass)
Form::Builder.register(name, klass)
end
# [Internal] List of registered hooks
- option :hooks, Hash.new { |h, k| h[k] = [] }
+ option :hooks, Hook::Set.new
# Register an extension hook
def hook(name, options={}, &block)
- hooks[name.to_s] << Hook.new(name.to_s, options, &block)
+ hooks.append(name, options, &block)
end
# List of i18n keys to pass into the Trestle.i18n JavaScript object
option :javascript_i18n_keys, [
"trestle.confirmation.title", "trestle.confirmation.delete", "trestle.confirmation.cancel", "trestle.dialog.error",