diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb index b9c0cc4..b78b035 100644 --- a/lib/camping-unabridged.rb +++ b/lib/camping-unabridged.rb @@ -123,6 +123,7 @@ def method_missing(m,*a) raise NoMethodError, "#{m}" end end + alias_method :u, :regular_update end # Helpers contains methods available in your controllers and views. You may add @@ -372,7 +373,7 @@ def initialize(r, e, m) #:nodoc: qs[fn]=fh if fn } elsif @method == "post" - qs.merge!(C.qs_parse(@in.read)) + qs.u(C.qs_parse(@in.read)) end @cookies, @input = @k.dup, qs.dup end @@ -540,11 +541,11 @@ def un(s); s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n){[$1.delete('%')].pack( # #=> {'post' => {'id' => '1', 'user' => '_why'}} # def qs_parse(qs, d = '&;') - m = proc {|_,o,n|o.merge(n,&m)rescue([*o]<x;Controllers::ServerError.new(r,e,'get').service( @@ -47,4 +47,4 @@ module Base;include Helpers;attr_accessor :input,:cookies,:env,:headers,:body, Views;def tag! *g,&b;h=g[-1];[:href,:action,:src].map{|a|(h[a]=self/h[a])rescue 0};super end end;H=HashWithIndifferentAccess;class H;def method_missing m,*a if m.to_s=~/=$/;self[$`]=a[0];elsif a.empty?;self[m];else;raise NoMethodError, -"#{m}" end end end end +"#{m}" end end;alias_method:u,:regular_update;end end