<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flash Remoting for Ruby on Rails &#187; Rails</title>
	<atom:link href="http://blog.rubyamf.org/category/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rubyamf.org</link>
	<description>Ruby AMF - Flash Remoting for Ruby on Rails</description>
	<lastBuildDate>Tue, 25 Aug 2009 12:23:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Maintenance Release: 1.6.1</title>
		<link>http://blog.rubyamf.org/2008/06/15/maintenance-release-161/</link>
		<comments>http://blog.rubyamf.org/2008/06/15/maintenance-release-161/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 04:28:05 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[AMF]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[RubyAMF]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=113</guid>
		<description><![CDATA[Hello all,
There was at least one bug running RubyAMF with Rails 2.1, and I fixed
that today, and all my reference apps (which are what passes for
tests) work, so I&#8217;m tagging that sucka as 1.6.1.
You can get that like:
script/plugin install http://rubyamf.googlecode.com/svn/tags/1.6.1/rubyamf

Or from the current tag:
script/plugin install http://rubyamf.googlecode.com/svn/tags/current/rubyamf

Now, for anyone interested, what was breaking was Rails 2.1&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Hello all,<br />
There was at least one bug running RubyAMF with Rails 2.1, and I fixed<br />
that today, and all my reference apps (which are what passes for<br />
tests) work, so I&#8217;m tagging that sucka as 1.6.1.<br />
You can get that like:<br />
script/plugin install <a href="http://rubyamf.googlecode.com/svn/tags/1.6.1/rubyamf" target="_blank" rel="nofollow">http://rubyamf.googlecode.com/svn/tags/1.6.1/rubyamf</a></p>
<p><a href="http://rubyamf.googlecode.com/svn/tags/1.6.1/rubyamf" target="_blank" rel="nofollow"></a><br />
Or from the current tag:<br />
script/plugin install <a href="http://rubyamf.googlecode.com/svn/tags/current/rubyamf" target="_blank" rel="nofollow">http://rubyamf.googlecode.com/svn/tags/current/rubyamf</a></p>
<p><a href="http://rubyamf.googlecode.com/svn/tags/current/rubyamf" target="_blank" rel="nofollow"></a><br />
Now, for anyone interested, what was breaking was Rails 2.1&#8217;s forgery<br />
protection, which stops cross site scripting attacks by placing a<br />
security code in HTML and Ajax forms and verifying that that&#8217;s the<br />
right code on the Rails side.<br />
My fix was just to add the AMF mime type to the list of mime types<br />
that aren&#8217;t checked for forgery protection, alongside XML and JSON. I<br />
think it belongs there, because there&#8217;s no way that I know of to hook<br />
into the Rails forgery protection.<br />
To do the same type of thing from a Flash app would be a bit of a<br />
different process, and I&#8217;m not quite sure what the best way to think<br />
about that is, nor if it&#8217;s actually a problem we need to worry about<br />
anytime soon. Any thoughts?<br />
Upshot: RubyAMF 1.6 for Rails 2, RubyAMF 1.6.1 for Rails 2.1.</p>
<p>Cross posted from (http://groups.google.com/group/rubyamf)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2008/06/15/maintenance-release-161/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>RubyAMF at Rails to Italy</title>
		<link>http://blog.rubyamf.org/2007/10/25/rubyamf-at-rails-to-italy/</link>
		<comments>http://blog.rubyamf.org/2007/10/25/rubyamf-at-rails-to-italy/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 01:56:08 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[RubyAMF]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=81</guid>
		<description><![CDATA[If you&#8217;re by any chance going to Rails to Italy. Check out Peter Armstrongs&#8217; speach, there will be a (short) RAMF plug. Thanks Peter!

]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re by any chance going to Rails to Italy. Check out Peter Armstrongs&#8217; speach, there will be a (short) RAMF plug. Thanks Peter!</p>
<p><a href="http://www.railstoitaly.org/"><img src="http://blog.rubyamf.org/images/railstoitaly.png" alt="RubyAMF @ Rails to Italy" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2007/10/25/rubyamf-at-rails-to-italy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RubyAMF &#8211; Skipping 1.3.4 And Writing 1.3.5</title>
		<link>http://blog.rubyamf.org/2007/10/23/rubyamf-skipping-134-and-writing-135/</link>
		<comments>http://blog.rubyamf.org/2007/10/23/rubyamf-skipping-134-and-writing-135/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 07:13:52 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyAMF]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=80</guid>
		<description><![CDATA[Surprise! RubyAMF 1.3.5 is under way, and no 1.3.4 will be released.
So here&#8217;s the scoop. Aryk Grosz from MixBook contacted me about using RubyAMF and some experiences he was having. RubyAMF would start to slow down with large complex data structures even slower than WebORB depending on the size, Yikes! Aryk had put time into [...]]]></description>
			<content:encoded><![CDATA[<p>Surprise! RubyAMF 1.3.5 is under way, and no 1.3.4 will be released.</p>
<p>So here&#8217;s the scoop. Aryk Grosz from MixBook contacted me about using RubyAMF and some experiences he was having. RubyAMF would start to slow down with large complex data structures even slower than WebORB depending on the size, Yikes! Aryk had put time into optimizing RubyAMF and you would not believe the results we&#8217;re getting.</p>
<p>I went down to <a href="http://www.mixbook.com">Mixbook</a> in San Jose on Sunday and spent a little time with Aryk ripping apart RubyAMF. So we&#8217;ve pretty much re-written RubyAMF, here&#8217;s a brief rundown of what&#8217;s going on.</p>
<p>First let&#8217;s talk restructure. We ripped out 60% of the code base which was legacy from RAMFL. I won&#8217;t go into the gory details but we&#8217;ve re-arranged a lot, changed a lot of names. For example ValueObjects are now ClassMappings. Which is more appropriate because RAMF has full class mapping support. We&#8217;ve also put an init.rb file in the plugin so all the requires get done on application startup.</p>
<p>There are a couple other features we&#8217;ve added to class mapping definitions, such as the :associations, :attributes, and :ignore_fields properties. The :ignore_fields is just like it sounds, for a specific class mapping you can ignore specific properties on it. You can also define a global ignore fields like so: ClassMappings.ignore_fields.</p>
<p>The :associations and :attributes are for performance reasons. You aren&#8217;t required to use them, but if you do it speeds up the serializer even more. We&#8217;ve also change the names of :incoming / :map_to / <img src='http://blog.rubyamf.org/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> utgoing to :actionscript / :ruby.</p>
<p>Performance! This thing is about 5x faster. As an example, a data structure of about 1500 objects that&#8217;s used in Mixbook takes around 35 seconds with WebORB. RAMF averages 2.4 seconds. Sweet! You can even see the speed increase on one object. It&#8217;s that much faster.</p>
<p>We also decreased the size of the data transfer. As an example, let&#8217;s say an AMF message was 250K, it would now be about 100K. That&#8217;s a huge difference.</p>
<p>That&#8217;s just a small preview of what&#8217;s going on. Sorry for the inconvenience of not getting 1.3.4 done last week, but as soon as we started these changes and optimizations &#8211; 1.3.4 was obsolete.</p>
<p>So hats off to Aryk for the help, he did a most of the speed optimizations and has been refactoring and writing a ton for RubyAMF. Thanks for the help!</p>
<p>And to top it all off, RubyAMF will have it&#8217;s first &#8220;in production&#8221; customer over at MixBook. They&#8217;re working on re-factoring their rails app to use RubyAMF. Awesome!</p>
<p>-Aaron</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2007/10/23/rubyamf-skipping-134-and-writing-135/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>RubyAMF 1.3.4 Preview</title>
		<link>http://blog.rubyamf.org/2007/10/16/rubyamf-134-preview/</link>
		<comments>http://blog.rubyamf.org/2007/10/16/rubyamf-134-preview/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 07:14:40 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyAMF]]></category>
		<category><![CDATA[Team]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=77</guid>
		<description><![CDATA[Just in case you&#8217;re not on the mailing list. I sent out a 1.3.4 Preview release announcement. Read it here.
]]></description>
			<content:encoded><![CDATA[<p>Just in case you&#8217;re not on the mailing list. I sent out a 1.3.4 Preview release announcement. <a href="http://groups.google.com/group/adobe-rubyonrails-ria-sdk/browse_thread/thread/38ed9be3b76cf6ba">Read it here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2007/10/16/rubyamf-134-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Remoting Parameter Mapping Feature</title>
		<link>http://blog.rubyamf.org/2007/10/13/new-remoting-parameter-mapping-feature/</link>
		<comments>http://blog.rubyamf.org/2007/10/13/new-remoting-parameter-mapping-feature/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 08:14:55 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[RubyAMF]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=75</guid>
		<description><![CDATA[To whet your RubyAMF appetite a little more. We&#8217;ve added in a new feature that will be in 1.3.4. This new feature allows you to map incoming remoting parameters to to params[:] hash how ever you like.
As a quick example, let&#8217;s say you wanted to map the &#8220;id&#8221; property of a &#8220;User&#8221; object to the [...]]]></description>
			<content:encoded><![CDATA[<p>To whet your RubyAMF appetite a little more. We&#8217;ve added in a new feature that will be in 1.3.4. This new feature allows you to map incoming remoting parameters to to params[:] hash how ever you like.</p>
<p>As a quick example, let&#8217;s say you wanted to map the &#8220;id&#8221; property of a &#8220;User&#8221; object to the params[:id] key. Here&#8217;s how you&#8217;d do it.</p>
<p>Here&#8217;s an example actionscript remoting call:</p>
<pre>
 service = new RemotingService("...","UserController",3);
 service.destroy([myUser],result,fault);
</pre>
<p>And the supporting RubyAMF configuration to accomplish this mapping:</p>
<pre>
Parameter::Map.register({
 :controller => :UserController,
 :action => :destroy,
 :params => { :id => "{0}.id" }
})
</pre>
<p>This is a big improvement over the old way, which would only map the first parameter into the params[:] hash, you can decide what gets put where.</p>
<p>As another example. If you wanted to map the 3rd arguments &#8220;firstname&#8221; property to &#8220;params[:firstname]&#8220;. You&#8217;d do this:</p>
<p>AS:</p>
<pre>
 service.myaction([...,...,thirdObject],result,fault);
</pre>
<p>Config:</p>
<pre>
Parameter::Map.register({
 :controller => :UserController,
 :action => :myaction,
 :params => { :firstname => "{2}.firstname" }
})
</pre>
<p>As mentioned, this will hit in 1.3.4. Hope it&#8217;s useful <img src='http://blog.rubyamf.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  -A</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2007/10/13/new-remoting-parameter-mapping-feature/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Development Efforts</title>
		<link>http://blog.rubyamf.org/2007/10/01/development-efforts/</link>
		<comments>http://blog.rubyamf.org/2007/10/01/development-efforts/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 03:09:06 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyAMF]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=67</guid>
		<description><![CDATA[As you&#8217;ve probably seen I&#8217;m working on finding some people for support development on RubyAMF. Quite a few people are interested with RubyAMF, and Rails 2 support and feature additions need to be done as soon as rails 2 is ready. So I&#8217;m gearing up for that hopefully with some help. There should be plenty [...]]]></description>
			<content:encoded><![CDATA[<p>As you&#8217;ve probably seen I&#8217;m working on finding some people for support development on RubyAMF. Quite a few people are interested with RubyAMF, and Rails 2 support and feature additions need to be done as soon as rails 2 is ready. So I&#8217;m gearing up for that hopefully with some help. There should be plenty of time for dev as Rails 2 is only in a preview release state.</p>
<p>Hang in everyone! I&#8217;ll officially be back from vacation on the 8th to release 1.3.4 and gear up for the next dev tasks. Additionally I don&#8217;t see any major conflicts with RubyAMF and Rails 2, as there is only one entry point into Rails (aside from the rubyamf controller).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2007/10/01/development-efforts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RubyAMF too Dark?</title>
		<link>http://blog.rubyamf.org/2007/09/20/rubyamf-too-dark/</link>
		<comments>http://blog.rubyamf.org/2007/09/20/rubyamf-too-dark/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 18:02:36 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyAMF]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=53</guid>
		<description><![CDATA[So maybe this isn&#8217;t a question you were expecting. But does anyone else have any problems with the colors / brightness on RubyAMF? This post didn&#8217;t include RubyAMF. Apparently because it&#8217;s too dark to read. Which is alright. But it makes me want to hear from more people. Should I re-skin the site to be [...]]]></description>
			<content:encoded><![CDATA[<p>So maybe this isn&#8217;t a question you were expecting. But does anyone else have any problems with the colors / brightness on RubyAMF? <a href="http://www.flex888.com/2007/09/20/10-flex-and-ruby-on-rails-integration-examples.html">This post</a> didn&#8217;t include RubyAMF. Apparently because it&#8217;s too dark to read. Which is alright. But it makes me want to hear from more people. Should I re-skin the site to be mostly white with some red? I&#8217;m on a mac so the brightness / gamma is different and it shines for me <img src='http://blog.rubyamf.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>RubyAMF is getting to the point where it&#8217;s a great experience tying it in with Rails (and of course with Lite) &#8211; the fact that it works with scaffolding and in your controller with render :amf makes it a winner for me. But if people don&#8217;t use it because they can&#8217;t read the site then it&#8217;s time for an update. I love working on RubyAMF so I want everyone to have a great experience with it. Maybe this sounds weird &#8211; but I LOVE remoting. The first project I did with remoting was with <a href="http://www.mercurycloud.com">MercuryCloud</a> and <a href="www.5etdemi.com/blog">Patrick Mineault</a>.  Ever since then it&#8217;s been a key part of almost every project I build. So I&#8217;m not trying to be pushy about RubyAMF at all, just know that everything I put into RubyAMF is pretty carefully thought out for performance factor and ease of use.</p>
<p>What do you think, time for a re-skin or color update?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2007/09/20/rubyamf-too-dark/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>RubyAMF at RailsConf Europe</title>
		<link>http://blog.rubyamf.org/2007/09/19/rubyamf-at-railsconf-2007/</link>
		<comments>http://blog.rubyamf.org/2007/09/19/rubyamf-at-railsconf-2007/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 15:01:40 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyAMF]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=52</guid>
		<description><![CDATA[Simeon Bateman put together a nice demo app for RailsConf to show off the power of Flex and Rails. He&#8217;s got three examples &#8211; an HTTPService example, weborb, and RubyAMF. Check them out.
]]></description>
			<content:encoded><![CDATA[<p>Simeon Bateman put together a nice demo app for RailsConf to show off the power of Flex and Rails. He&#8217;s got three examples &#8211; an HTTPService example, weborb, and RubyAMF. <a href="http://blog.simb.net/articles/2007/09/19/flex-with-rails-at-railsconf-europe">Check them out.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2007/09/19/rubyamf-at-railsconf-2007/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>RubyAMF. Flash. And Rails&#8217; Params</title>
		<link>http://blog.rubyamf.org/2007/09/18/rubyamf-flash-and-rails-params/</link>
		<comments>http://blog.rubyamf.org/2007/09/18/rubyamf-flash-and-rails-params/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 07:22:23 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyAMF]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=50</guid>
		<description><![CDATA[I&#8217;d like to shed a little more light on the best ways to send parameters to RubyAMF Rails, so that you can use params[:]. Specifically using Flash 9, NOT Flex. The most important two things to note are these:

Any objects properties whether it be a basic object, or value object get merged into the params [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to shed a little more light on the best ways to send parameters to RubyAMF Rails, so that you can use params[:]. Specifically using Flash 9, NOT Flex. The most important two things to note are these:</p>
<ul>
<li>Any objects properties whether it be a basic object, or value object get merged into the params hash. ONLY the first parameter gets merged though.</li>
<li>Any incoming value object also gets put into params[:classtype]. So if an incoming VO is of the type &#8220;vo.Event&#8221;, it will be put in params[:event]. This will enable you to fully use scaffolding without adding is_amf conditionals.</li>
</ul>
<p>So what does this mean? If you send parameters correctly from Flash, there are only a few updates to get everything working correctly on the rails side. Here&#8217;s a generic example that should translate to a real working example.</p>
<p>RAILS:</p>
<pre>
class MyService < ActionController
  def update
    user = User.find(params[:id])
    if is_amf
      u = user.update_attributes(:name => params[:name], :email => params[:email])
    else
      user = User.find(:id)
    end
    if u
      render :amf => true
    end
  end

  def create
   if is_amf
     user = User.new({:name => params[:name], :email => params[:email]})
   else
     user = User.new(params[:user])
   end
   if user.save
     render :amf => true
   end
  end

  def destroy
   user = User.find(params[:id])
   user.destroy
   render :amf => true
  end
end
</pre>
<p>So in this example the destroy method works without having to mix in the is_amf variable. The create and update method has to mix in the is_amf variable because we&#8217;re not passing value objects back and forth.</p>
<p>Here is the corresponding AS3 to call these methods correctly.</p>
<p>AS3</p>
<pre>
function createUser():void
{
  myservice.create([{name:'asdfasdf',email:'aaron'}], onResult,onFault);
}

function updateUser(user:Object):void
{
   //user should be  => {id:1, name:'Aaron', email:'aaron@something.com'}
   myservice.update([user],onResult,onFault);
}

function destroyUser(id:Number):void
{
  myservice.destroy([{id:id}],onResult,onFault);
}
</pre>
<p>So what do we do to update the create and update methods so they don&#8217;t have to use is_amf? Value objects or _explicitType. These are two options to help you map everything the way you want. Here&#8217;s how they both work.</p>
<p>Value objects are simple. They boil down to a generic object with one extra piece of information &#8211; the class type. In our case. A &#8216;User&#8217; class. So when you instantiate a value object, and send it over to RubyAMF, all your properties come over in a generic object, but it also sends the class type. Pretty simple. On the RubyAMF side your class type is caught and a Value Object of the same type is instantiated in Ruby / Rails. So if your value object is a User class, it is in turned mapped to params[:user].</p>
<p>So do we absolutely need value objects to get the params[:user] hash to be the correct object? No. RubyAMF uses a special property to handle value objects on the server side. _explicitType. If you send a generic object with the _explicitType property, it will be turned into a corresponding value object for you. It just so happens that the _explicitType is used to map a value object class to params[:classtype]. So we can use this to map our generic object to the params[:user].</p>
<p>Let&#8217;s look at how we can update methods so we don&#8217;t need to use is_amf.</p>
<p>Rails:</p>
<pre>
def create
  user = User.new(params[:user])
  if user.save
    render :amf => user.as_single!
  end
end

def update
  user = User.find(params[:id])
  if user.update_attributes(params[:user])
    render :amf => true
  end
end
</pre>
<p>AS3</p>
<pre>
function createUser():void
{
  myservice.create([{_explicitType:'user', name:'Aaron', email:'aaron@something.com'}],onResult,onFault);
}
function updateUser(user):void
{
  //uyser should be => {id:1, _explicitType:'user', name:"Aaron", email:"myemail"}
  myservice.update([user],onResult,onFault)
}
</pre>
<p>So by specifying the _explicitType property, it&#8217;s going to put an active record update_hash in params[:user]. Pretty cool. Now I&#8217;m not suggesting you use _explicitType at all times as it&#8217;s kind of a hack. You should use value objects instead. But hey, you&#8217;ll probably benefit from knowing more about RubyAMF.</p>
<p>Please let me know if there are any questions or suggestions for making it better.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2007/09/18/rubyamf-flash-and-rails-params/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>RubyAMF 1.3.3</title>
		<link>http://blog.rubyamf.org/2007/09/16/rubyamf-133/</link>
		<comments>http://blog.rubyamf.org/2007/09/16/rubyamf-133/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 03:43:51 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyAMF]]></category>

		<guid isPermaLink="false">http://blog.rubyamf.org/?p=48</guid>
		<description><![CDATA[Ok folks, here is 1.3.3. This release has a few really important fixes in it. In case you didn&#8217;t notice, I silently released 1.3.2b into the rails installer. That had one serious bug fix, and 1.3.3 has a few more fixes that I came across that are somewhat serious. So please update to 1.3.3.
Check out [...]]]></description>
			<content:encoded><![CDATA[<p>Ok folks, here is 1.3.3. This release has a few really important fixes in it. In case you didn&#8217;t notice, I silently released 1.3.2b into the rails installer. That had one serious bug fix, and 1.3.3 has a few more fixes that I came across that are somewhat serious. So please update to 1.3.3.</p>
<p><a href="http://wiki.rubyamf.org/wiki/show/ReleaseLog">Check out the release log for details.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rubyamf.org/2007/09/16/rubyamf-133/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
