fix activeresource build method
adding test