similar to: Would like include model association in to_xml

Displaying 20 results from an estimated 640 matches similar to: "Would like include model association in to_xml"

2008 Feb 15
understanding dom0 usage memory
Hi guys, First of all, sorry for my poor english. This is my first message at this list. I''m using Xen on several machines since last November. Right now I''m having a specific problems with 2 servers: both are losing the network on dom0 but all guest systems are still running fine. Looking at those dom0 logs I''ve discovered that sometimes linux kernel OOM-Killer
2010 Jun 21
Controllers, what? why?
Hi, I am starting to learn rails and I went through the guide and a couple of tutorials. Even though I understand controllers or at least I can use them I can''t see yet the whole picture. Why do you need several controllers for a single application? If a controller is just a class whose methods interface with models and views, why not have a single controller for the whole application?
2004 Aug 30
Shorewall upgrade messed up my firewall
Hi all, I''m using Gentoo Linux Distribution and I''ve upgraded my firewall from Shorewall 1.4 to 2.0.4, however my LANs stop having internet access. I have a server with shorewall 2.0.4 installed and 3 interfaces. eth0 and eth1 are interfaces to a LAN and to my laptop and eth2 is the net interface. I have masq like: eth2 eth0 eth2 eth1
2008 Aug 28
Rendering User attributes in XML
Let''s say an app has a User, and a User has many friends. Also, let''s say the app authentication was built on the restful_authentication plugin, and we have email and password in the Users table. The friends controller index might look like this; # GET /users/1/friends # GET /users/1/friends.xml def index @users = @user.friends respond_to do |format|
2006 Jun 19
to_xml depth ...
hello, The "render :xml => myFriends.to_xml", return something like: <people> <person> <id type="integer">2</id> ... <person> But a Person has a "has_many" relationship and they are not in the xml, => so is it possible to change the depth of the marshall process ? if it not possible, what are the "rails
2009 Jan 05
ROXML versus simple to_xml
How they differ? Does the to_xml method of the classes array/hash/object is based on ROXML lib? As I see in, roxml needs we define the class (class Book in the guide) before to convert a object to xml. Moreover, the method to_xml (when not using "include ROXML") just accepts any existing object, what is much suitable. I need to
2006 Aug 15
to_xml and underscores
hi, i am looking for a solution whereupon calling myEntityObject.to_xml does not convert my attributes containing underscores into hyphens. at the moment an attribute named "my_own_attribute" is converted into <my-own-attribute>. does anybody have an idea how to change that and have to_xml generate <my_own_attribute> thanks ciao robertj -- Posted via
2010 Feb 11
Inconsistent Hash#to_xml Method
I have a unit test that demonstrates some inconsistent behavior with a Hash being converted to XML with the :root option. Sometimes it works fine: => ''test'') "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test>\n</test>\n" But sometimes I get an argument error: =>
2007 Feb 21
Rendering all the elements when calling Array#to_xml
When I call to_xml on an array, I want it to get the XML for all the elements in it. I''ve defined to_xml in my class. >> r.to_xml => "<video><id>1</id><views>2</views></video>" >> a = [r] => [#<StatisticsReport:0x3259f38 @video_id=1, @views=2>] >> a.to_xml => "<?xml
2017 Aug 12
package building problem Centos 7 & R 3.4.1
On Friday, 11 August 2017 22.51.12 WEST Paul Johnson wrote: > Dear everybody: > > Packages that DO pass the package check on my Ubuntu 17.04 laptop with > R 3.4.1 and Mac OSX do not build on Centos 7 with R 3.4.1. I'm pretty > sure I have an environment defect, but cannot find it. Hi Paul, the first error that you get is that ggplot2 is not installed: Error in
2006 Jul 31
is it possible to make to_xml use underscore instead of dash?
Hi all, I am getting ActiveRecord to produce XML with render :xml => @user.to_xml However, on the client end it is a bit annoying for me to deal with attributes like first-name. I would much rather have first_name. Is there any way for me to turn off the behavior of converting _ to -? This seems to be done by a call to dasherize inside the to_xml of
2006 Oct 13
How to get a count of line_items
I am fairly new to Rails, and I am having difficulty in forgetting the old way of developing and using the Rails way. This is my question, using orders and line_items as an example. An order has_many line_items A line_item belongs to order In my OrdersController I have def summary @orders = Orders.find(:all) render :xml => @orders.to_xml() end What I want to achieve is to
2013 Jan 02
mgag200 driver does not work properly with Xen
When using Xen Hypervisor, the video goes very slow after module load in console. Xorg does not run. My boot process (in kernel 3.7.1 from elrepo, my default kernel.): 1. Hypervisor is loaded (from here, the screen resolution is 640x480 - text scrolling fast) 2. Kernel is loaded 3. mgag200 module is loaded 4. Screens enter native resolution (from here, the screen resolution is 1280x768 - text
2008 May 23
Problem with .to_xml and Hash.form_xml ?
Hi, i m trying to do some kind of database dump using .to_xml and after i try to fill my database back (well an other) with the content of the xml. Right now i m doing that : @xml = Video.find(:all).to_xml(:include=>[:vlogiciels]) it does produce : <videos> <video> <mycolumns> ..... <vlogiciels> <logiciel>
2007 May 17
Namespaced model valid #to_xml support in ActiveRecord, ActiveSupport and ActiveResource
Hi, Attached are links to two patches I submitted via the RoR Trac system a week or so ago: I refrained from creating a new Trac ticket for ARes, which will be affected if both of these patches are accepted by Core. There are a couple of workarounds for this issue, but it would be nice
2010 Mar 08
to_xml repeating elements and plain strings
Say I want to output XML like this: <myXML> <id>123</id> <fruit>apple</fruit> <fruit>banana</fruit> <fruit>pear</fruit> <fruit>lemon</fruit> </myXML> Is there a way of doing that with to_xml? It seems like there''s two problems: to_xml always creates a wrapping element
2007 Nov 20
Anyone using to_xml and procs...
I''m looking for comments on In my opinion, the current behaviour is a bug, and should be fixed. If you have a use case where passing procs to the child associations is actually useful, chime in. Jonathan del Strother --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2007 Jan 17
changing the default behaviour of to_xml for has-many: associations
I recently submitted a patch to work around an issue I was having & added a new optional behaviour to the to_xml method but on further reflection I wonder if the default behaviour should be changed. The gory detail, documentation and test case is all here... Here''s a brief example... class Person < ActiveRecord::Base
2007 Dec 02
Better way for select list for belongs_to?
I''m currently doing all of this just to have a drop-down list of Courses for a particular student: ===== edit template ===== <%= :course, @courses, :selected => %> =================== ===== students controller ===== def edit @student = Student.find(params[:id]) @page_title = "Edit #{@student.full_name}" @courses =
2006 Mar 01
library file for R''s nmath routines
Hi, I am wondering where the library file for R''s nmath routines are? Doing a search on libR gave me the following: /usr/lib/ /usr/lib/ /usr/lib/R/lib/ /usr/lib/R/lib/ /usr/lib/ /usr/lib/ None of these have the functions in