Displaying 20 results from an estimated 40000 matches similar to: "Deserializing objects in the controller"
2011 Mar 09
1
ActiveRecord serialize method not returning YAML array in test environment.
Hello,
I''ve got a problem with deserialization of AR "serialize" method
(http://apidock.com/rails/ActiveRecord/Base/serialize/class) in my
tests.
It just gives me pure String instead of my data Array.
Example:
User > AR::Base
serialize :roles, Array
end
Console:
u = User.new
u.roles = ["admin", "support"]
u.save
# => true
User.first.roles
# =>
2006 Aug 11
0
serializing / deserializing active records with children
What is the best approach to serialize / deserialize full blown active
record objects with multiple child objects (one-to-many relations).
YAML::load(), YAML::dump() almost work :) -> loaded object has
children (I see them in breakpoint session: "puts parent"), but when I
am accessing children (e.g: "puts parent.emails") array becomes
cleared - I guess rails are trying to
2006 May 02
0
YAML failing to de-serialize
I''m seeing this same problem that Josh was seeing back on March 23rd
(see below)
I''ve got the following YAML snippet stored in a text field:
"--- !ruby/object:FieldValue \nattributes: \n item_id: 60\n title:
Test\n field_id: 15\n created_by_id: 5\n locale: en\n link:
www.cclearn.com\n comment: this is a test\n created_at: 2006-05-02
15:43:14.256792 Z\nnew_record:
2017 Jul 19
2
[RFC][ThinLTO] llvm-dis ThinLTO summary dump format
On Wed, Jul 19, 2017 at 8:43 AM Teresa Johnson <tejohnson at google.com> wrote:
> On Wed, Jul 19, 2017 at 8:31 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
>>
>>
>> On Mon, Jul 17, 2017 at 5:18 PM Mehdi AMINI <joker.eph at gmail.com> wrote:
>>
>>> 2017-07-17 16:49 GMT-07:00 David Blaikie via llvm-dev <
>>> llvm-dev at
2017 Jul 17
3
[RFC][ThinLTO] llvm-dis ThinLTO summary dump format
On Mon, Jul 17, 2017 at 6:11 AM Charles Saternos via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hey @chandlerc and @dblaikie,
>
> Any updates on this in relation to "[PATCH] D34080: [ThinLTO] Add
> dump-summary command to llvm-lto2 tool"?
>
Sorry you've kind of got stuck in the middle of this - but I'm still hoping
to hear/understand the pushback on
2017 Jul 19
4
[RFC][ThinLTO] llvm-dis ThinLTO summary dump format
On Mon, Jul 17, 2017 at 5:18 PM Mehdi AMINI <joker.eph at gmail.com> wrote:
> 2017-07-17 16:49 GMT-07:00 David Blaikie via llvm-dev <
> llvm-dev at lists.llvm.org>:
>
>>
>>
>> On Mon, Jul 17, 2017 at 6:11 AM Charles Saternos via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>>> Hey @chandlerc and @dblaikie,
>>>
2013 Feb 13
0
Announce: Puppet Dashboard 1.2.22 Available [ security release ]
This release of Puppet Dashboard addresses CVE-2013-0277 and
CVE-2013-0269. These are vulnerabilities that affect Ruby on Rails,
specifically around YAML serialization and JSON handling. They expose
vulnerable systems to SQL Injection, Denial of Service Attacks, and
arbitrary YAML deserialization.
Additionally, CVE-2013-0276 and CVE-2013-0263 affect vendored
components of Puppet Dashboard, but by
2007 Apr 18
1
YAML serialization
Hi,
something wrong with ActiveRecord or YAML? They don''t put Strings
into Quotes when it serializes. This gave me trouble when I
serialized a String with a double colon (eg. ''key: value''). After AR
unserialized the Value it became a Hash since a String ''key: value''
becomes attribute[:key] => value... :(
Sincerely
Florian
2011 Mar 29
0
Issue / code smell in AssociationProxy
I came across an issue in my code and after a hard debug session I
found something that smells.
First the context of my issue. I have a AR object that has a
polymorphic belongs_to currently tied to nothing, I want to dump it to
YAML.
record.to_yaml
This raises the following exception:
TypeError: wrong argument type nil (expected Data)
from
2012 Jan 31
3
(de)serialization problem with rails 3.2
I have a custom serializer object that I use for an attribute of
ActiveRecord as presented in this article:
http://www.edgerails.info/articles/what-s-new-in-edge-rails/2011/03/09/custom-activerecord-attribute-serialization/index.html
If I assign a value to that attribute with a form (in my case a nested
form), I don''t get the deserialized value in the params hash as it used
to be with
2006 Apr 21
0
Questions on version arg to setClass and serialized instances
I have a few questions and thoughts regarding class versioning and
serialized S4 class instances.
How is the version argument to setClass is intended to work? It
appears to want an externalptr, but that seems odd to me.
setClass("FOO", representation(x="numeric"), version="1.2.3")
Error in validObject(.Object) : invalid class
2009 Oct 12
2
yaml ?nodes? or nested maps
I want to iterate ?nodes? and ?leafs? for a yaml document:
thufir@ARRAKIS:~/projects/rss$
thufir@ARRAKIS:~/projects/rss$ ruby user.rb
user.rb:6: undefined method `[]'' for nil:NilClass (NoMethodError)
from user.rb:5:in `each_key''
from user.rb:5
thufir@ARRAKIS:~/projects/rss$
thufir@ARRAKIS:~/projects/rss$ ruby user2.rb
user2.rb:5: undefined method `[]'' for
2006 Mar 23
1
YAML inconsistencies...
I figured I''d post here before submitting a ticket, but I''m seeing some
confusing stuff when dealing with YAML now. I was using it to freeze
objects in my database, and so i had some data already around to mess with.
I upgraded both Ruby (1.8.3 -> 1.8.4) and Rails ( -> 1.1RC1) and this junk
started. I''ve outlined the problem in two pastes, which I''ll
2012 Jan 31
2
[LLVMdev] Disjoint types after reading several modules
Dear community,
we are currently facing a problem related to the new type system in llvm
3.0.
Our setting is the following: We have two or more modules, all in the
same LLVMContext. They are sharing some types, meaning that for example
functions in different modules are referencing the same (meaning pointer
identical) type.
Now we write the different modules to the disk, and read them back
2018 May 03
0
RFC: LLVM Assembly format for ThinLTO Summary
On Thu, May 3, 2018 at 2:16 PM, Steven Wu <stevenwu at apple.com> wrote:
>
>
> On May 1, 2018, at 4:50 PM, Teresa Johnson via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> Hi Mehdi, thanks for the comments, responses and a tweaked proposal below.
> Teresa
>
> On Tue, May 1, 2018 at 11:37 AM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>
2016 Dec 16
2
RPC on LLVM IR: any example programs for this?
Hi everyone,
I want to use an LLVM new feature (llvm::orc::remote::RPCBase) to implement
a simple RPC framework between two LLVM modules. It seems by this new class
we can do serialization/deserialization on LLVM IR type system directly.
But I haven't found any helpful stuff on google showing me how to use these
RPC APIs. Can anyone give me some hints or example programs showing me how
to use
2007 Sep 07
0
De-serializing attribute gives YAML::Objects?
I wonder rails 1.2.3 cannot deserialize attribute (objects) correctly
but give YAML::Object. Are there any workarounds or tricks to solve
the problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2016 Feb 11
2
[RFC] Error handling in LLVM libraries.
Hi All,
Now that this thread has accumulated some feedback, I thought I'd try to
summarize my thoughts on error handling in LLVM, and why I think this
proposal is worth adopting:
(1) Failure to check an error *is* a programmatic error, and our error
system should reflect this. This makes it easy to spot mistakes in our
error handling and correct them.
(2) Error returns should describe all
2016 Sep 27
2
Experiments with a replacement for the bitcode format
Hello,
Disclaimer: I have no plan to break 3.x bitcode compatibility in any way.
I’m experimenting with ideas to improve the current bitcode serialization and deserialization in general.
I’m interested in improving the speed and the flexibility of the reader/writer, as well as making the code easier to deal with.
My current griefs against our bitcode format are mainly the lack of built-in
2018 May 03
1
RFC: LLVM Assembly format for ThinLTO Summary
On Thu, May 3, 2018 at 3:58 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
> On Thu, May 3, 2018 at 3:52 PM Peter Collingbourne <peter at pcc.me.uk>
> wrote:
>
>> On Thu, May 3, 2018 at 3:29 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>>>
>>>
>>> On Thu, May 3, 2018 at 3:08 PM Peter Collingbourne via llvm-dev