Skip to content

Instantly share code, notes, and snippets.

@joseustra
Last active September 25, 2015 04:47
Show Gist options
  • Save joseustra/865509 to your computer and use it in GitHub Desktop.
Save joseustra/865509 to your computer and use it in GitHub Desktop.
config.rails3amf.gateway_path = "/rubyamf/gateway"
config.rails3amf.class_mapping do |m|
m.map :as => 'business.vo.Object', :ruby => 'Model'
end
config.rails3amf.map_params :controller => 'UserController', :action => 'show', :params => [:id]
gem 'RocketAMF', :git => 'git://github.com/rubyamf/rocketamf.git'
gem 'rails3-amf', :git => 'git://github.com/warhammerkid/rails3-amf.git'
class UserController < ApplicationController
respond_to :html, :amf
def getUser
@user = User.first
respond_with(@user) do |format|
format.amf { render :amf => @user.to_amf }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment