similar to: Limit attributes written out by to_yaml

Displaying 8 results from an estimated 8 matches similar to: "Limit attributes written out by to_yaml"

2006 Jan 12
0
yaml: custom saving and loading of specific classes
I''m trying to use ruby''s yaml library to serialise and deserialise some legacy classes. Simply adding a to_yaml_properties() method isn''t sufficient as special methods need to be called to get and set the properties (they''re not stored simply in instance variables that I can access), and I don''t want to change the class any more than I have to.
2006 Jun 23
0
to_yaml problem with option hash
Hi, I''m trying to make a fixture for testing with a serialized column. In the YAML fixture I''m trying to fill the serialized column with the to_yaml function. But I keep getting the ''---'' separator, which I don''t want because it is only a ''partial'' yaml fill. According to the documentation to_yaml takes a hash of options, so
2010 Jul 17
1
not able to find to_yaml definition
I am looking at rails edge source code. I am able to do puts User.find.to_yaml However I am not able to find piece of code where ''def to_yaml'' is. How this to_yaml serialization is working? can fully understand how to_json and to_xml is working but to_yaml beats me. Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2012 Jul 05
1
hash to_yaml in erb template not giving valid yaml
Hi, I want to use a file resource to write a facts.yaml file for Mcollective. For some reason it won''t provide a valid yaml format if I dump my scope to hash and convert to_yaml. file { "/etc/mcollective/facts.yaml" : owner => root, group => root, mode => 400, loglevel => debug, #content => inline_template("<%= scope.to_hash.reject {
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde
2006 Jun 30
6
RSS::Parser Documentation
Hi I am trying to use the RSS classes from "rss/2.0" and everything works but I want to know what attributes and properties I can get at from each of the classes I am getting back. For example, the class has a "channel" which I can tell has a "title" attribute (because it works when I query it :) but I would really like a list of every attribute that is
2005 Dec 27
3
myObject.send(column.name) from Agile Development book
I''m studying the Agile Development with Rails book. In the chapter that first sets up the depot application (page 68), there is this bit of code from a view: <% for product in @products %> <tr> <% for column in Product.content_columns %> <td><%=h product.send(column.name) %></td> <% end %> etc... I am trying to absorb both Ruby and
2010 Aug 25
18
Puppet hangs
Hello, we have one puppet server managing approx servers, all FreeBSD. The problem is that the puppet clients all hangs, one by one, eventually. They will run for anything between an hour up to a week. But eventually the all hang. We really like puppet and want to keep using it. But the way it is now is completely unusable. We''ve tried many versions, from 24.x, and now 2.6.1rc1. But