lib/rhoconnect/controller/js_base.rb in rhoconnect-4.0.0.beta.10 vs lib/rhoconnect/controller/js_base.rb in rhoconnect-4.0.0.beta.12

- old
+ new

@@ -60,26 +60,21 @@ klass.send(verb,action,opts,&block) end end def self.hshify(str) - result = JSON.parse(str, :symbolize_names => true) - # result = str.split(",").inject({}) do |res,element| - # items = element.split(":") - # res[items[0].to_sym] = items[1] - # res - # end - result + JSON.parse(str, :symbolize_names => true) end def self.js_block(key,finish_block=nil) Proc.new do json = { :url => key, :args => params, :model => under_score(params[:source_name]), :route => 'request' } + json[:user] = @model.current_user.login if @model return_value = NodeChannel.publish_channel_and_wait(json,@model) if finish_block self.send(finish_block, return_value) else return_value \ No newline at end of file