Code Monkey home page Code Monkey logo

rails3-amf's People

Contributors

oleriesenberg avatar warhammerkid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rails3-amf's Issues

rails3-amf ":include" argument

Hello Warhammerkids,
I am changing from RubyAMF (rails 2 - rubu 1.8 to Warhammerkids Rails3-amf - (rails 3.0.3 - ruby 1.9.2)
It's a great choice !!!
Thanks for this Gem !!!!

One those issues is, how can I get records from an association to the array, which is sent back to the Flex-Application.

(I have update the rails3-amf with commit 63ce564)
in my controller :
def find_all
@Inventeurs = Inventeur.all

respond_with(@inventeurs) do |format|
  format.amf  { render :amf => @inventeurs.to_amf(:include => [:choses]) }
end         

end
With this code I get back all correctly typed Inventeur Objects as an Array, with the records from the ":include" argument[:choses].
but all the attributes of ChoseVO are not transmitted except “commentaire”.
ChoseVO Object
public class ChoseVO implements IValueObject {
public var id:int;
public var dateDepot:Date;
public var inventeurId:int;
public var categorieId:int;
public var couleurId:int;
public var marqueId:int;
public var rangementId:int;
public var dateRestitution:Date;
public var declarationId:int;
public var commentaire:String;
public var dateApurement:Date;

Thanks for any help.

CSRF

This isn't an issue per se, but I didn't know how else to contact you.

You are quoted here stating that AMF has it's own system for preventing CSRF. Can you elaborate on that? I've been researching this exact topic and haven't found anything anywhere so far that gives a definitive answer on whether a backend exposing Flex RPC services is vulnerable to CSRF.

Result Array

Hi Warhammerkid,
I just updated my rails3-amf installation to the latest release from Github. After this update Rails3amf is returning an array of data, but only the first record in this array is of the correct Type. Pls. see this example:

returned result from Rails:
[0...99]
[0] com.myw.vo.UserVO (@32619921)
[1] Object (@37d4d671)
[2] Object (@35c48779)
[3] Object (@355821f1)
[4] Object (@360fa2e1)
[5] Object (@357824a9)
[6] Object (@37d4d1d9)
[7] Object (@37d4df89)
[8] Object (@37e89d79)
[9] Object (@37c54401)
[10] Object (@35782e69)

Do have I have to change something, or is this a little bug ?? In the version prior to this update, everything went fine.

Thanks and regards
Christian

SystemStackError Exception: stack level too deep

Completed 200 OK in 30473ms (Views: 1.8ms | ActiveRecord: 0.8ms)
Sending back AMF

SystemStackError (stack level too deep):


Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (5.1ms)
Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.0.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (9.5ms)
Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.0.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (74.8ms)

I've tried to debug and just discovery that RocketAMF does not serialize well an array of model instances. Here is my controller code:

def posts
    @posts = Post.all
    render :amf => @posts
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.