pakyow-presenter/lib/presenter/binder.rb in pakyow-presenter-0.7.0 vs pakyow-presenter/lib/presenter/binder.rb in pakyow-presenter-0.7.1

- old
+ new

@@ -4,13 +4,13 @@ include Pakyow::GeneralHelpers class << self attr_accessor :options - def binder_for(klass) - View.binders = {} unless View.binders - View.binders[klass.to_s.to_sym] = self + def binder_for(*args) + View.binders ||= {} + args.each { |klass| View.binders[klass.to_s.to_sym] = self } end def options_for(*args) self.options = {} unless self.options self.options[args[0]] = args[1] @@ -51,10 +51,10 @@ else action = routes[:create] method = "post" end - return { :action => action, :method => method } + return { :action => File.join('/', action), :method => method } end end end end