「ruby rails プラグイン」の検索結果
「RubyAMF」
から
次の単語がハイライトされています :
ruby script/plugin install http://rubyamf.googlecode.com/svn/trunk/
ruby script/generate controller sample
class SampleController <ApplicationControllerdef helloworld render :amf => "HelloWorld" endend
import org.rubyamf.remoting.ssr.RemotingService;
import org.rubyamf.remoting.ssr.ResultEvent;
import org.rubyamf.remoting.ssr.FaultEvent;
public class Main extends Sprite {public function Main() { var serv:RemotingService = new RemotingService( "http://192.168.1.160:8181/rubyamf/gateway", "SampleController" ); serv.helloworld([], on_result, on_fault); } private function on_result(evt:ResultEvent):void { trace(evt.result); } private function on_fault(evt:FaultEvent):void { trace("ERROR"); }
}
serv.helloworld([], on_result, on_fault);
trace(evt.result);
serv.create([ {last_name:last_name.text, first_name:first_name.text} ], on_result, on_fault);
params[0][:first_name]
params[0][:last_name]