similar to: Precision issue with date parsing in ActiveRecord

Displaying 20 results from an estimated 7000 matches similar to: "Precision issue with date parsing in ActiveRecord"

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 # =>
2010 May 14
1
select method on ActiveRecord::Relation brakes enumeration
class Brake scope :good, where(:quality => ''good'') end Brake.all.select &:nil? #=> works fine Brake.good.select &:nil? #=> FAILS Last statement fails because Brake.good.select is returning ActiveRecord::Relation and not an array. I have posted a detailed discussion on ticket #4589 .
2010 Feb 19
0
Problem in ActiveRecord#to_xml
Hi, a couple of days ago I filed a ticket related to a problem with the to_xml ActiveRecord method. ( https://rails.lighthouseapp.com/projects/8994/tickets/3982-patch-solved-a-bug-that-prevented-xml-serialization-when-activerecord-attributes-contains-more-than-column-values ). I solved it by making to_xml to infere the type by means of a ruby-xml type conversion, using a Hash that was already
2011 Mar 19
0
ActiveRecord::Relation#except and #only loses scope extensions
Hi, I''ve written a patch to fix a bug in except and only on ActiveRecord::Relation to lose any extensions added by earlier scopes. Since making a pull request is erroring on my on github, I''ve added the patch to lighthouse too. This can be added to the Rails 3.0.x branch as well. https://github.com/iain/rails/commit/a0bd5ba2fa38155ef6c036b256b08414eb9a2af1
2010 Jun 09
1
[patch] fix bytesize in exception template; multibyte titleize
Hi all, I wanted to draw some attention to a couple of very small multibyte-related patches I believe should be included before Rails 3.0 RC1: * Use String#bytesize rather than String#length in exception templates: This is a simple case where string length is checked, but bytes is needed, so it breaks with string with multibyte chars.
2010 Apr 18
1
Add shorthand support for routes like /projects/status(.:format)
Hi, when trying to migrate Signal to Rails 3 I tried to use the shorthand route for: match ''/projects/status(.:format)'' but it thrown an error because the controller was not specified. This happend because actually the shorthand routes only work with routes without optional parameters. The modification to support routes ending with a optional parameters is very simple, as can
2010 Dec 07
0
A couple of patches
I''ve submitted a couple of patches in Ligththouse. Provide NoStore implementation of ActiveSupport::Cache::Store This patch provides a NoStore implementation of ActiveSupport::Cache::Store suitable for use in development and test environments where the code need to use the cache interface, but actually caching data is not desired.
2010 Apr 05
2
Harmonizing JSON/XML serialization
The way Rails handles root nodes in JSON and XML serialization is inconsistent. This has been discussed before: https://rails.lighthouseapp.com/projects/8994/tickets/2584-232-activeresource-json-doesnt-send-parameters-with-root-node This seems mostly taken care of with ActiveModel::Base.include_root_in_json, especially if/when it ends up in ActiveResource. However, there is also the issue of how
2013 Apr 24
1
Floating point precision causing undesireable behaviour when printing as.POSIXlt times with microseconds?
Dear list, When using as.POSIXlt with times measured down to microseconds the default format.POSIXlt seems to cause some possibly undesirable behaviour: According to the code in format.POSIXlt the maximum accuracy of printing fractional seconds is 1 microsecond, but if I do; options( digits.secs = 6 ) as.POSIXlt( 1.000002 , tz="", origin="1970-01-01") as.POSIXlt( 1.999998 ,
2012 Jun 13
0
Weird (?) ActiveSupport::TimeZone parse behaviour
Hi I must be slipping, but say I have a string that looks like: 3/11/2012 2:50:00 AM If I use the UTC timezone and ask it to parse this time, what would you expect the result to be? Personally, I''d say 3/11/2012 2:50:00 AM UTC Given this is the DST switchover date (for some places) this is an edge case. It''s the "spring forward" rule so 2:50 AM is 3:50... But
2011 Mar 18
1
ActiveResource: prefix attributes that are mass assigned are not readable - Stale ?
Hi, I noticed that 2 days ago that this ticket was marked "stale". https://rails.lighthouseapp.com/projects/8994/tickets/6171 But the issue is still here (I checked just now), and it reminded me I had a patch for it I forgot to submit, so I attached the patch file to the ticket. Since I''m still new on this, can someone please point me the right procedure ? Should I have
2010 Mar 20
1
[PATCH] AR migration generator includes model's modules in table name. [#4230]
Hello! Could someone review the patch attached to [1] and provide feedback? Briefly, it targets rails 3, and fixes "rails g model admin/post". The generated migration creates a "admin_posts" table while the model expects a table simply named "posts". With the patch, the migration creates "posts". Thank you! --phil-- [1]
2010 Jun 18
1
[PATCH] option_groups_from_collection_for_select should produce an HTML-safe string
Can somebody please review my ticket: https://rails.lighthouseapp.com/projects/8994/tickets/4879 It''s a trivial bugfix ("option_groups_from_collection_for_select should produce an HTML-safe string") before RC, I think. Cheers, Wincent -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group,
2008 May 05
1
eager loading has_one fix
I believe I have fixed the issue Trever noted with has_one (http://rails.lighthouseapp.com/projects/8994/tickets/64-eager-loading-inconsistency ) if people would like o have a look. Fred --~--~---------~--~----~------------~-------~--~----~ 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
2010 Nov 01
1
[patch] Allowing to_xml to rename keys in lower camel case format
Hi all, I''ve created and submitted a patch to resolve an issue I had while attempting to meet the OpenSocial API specifications, which dictates that the xml output have tags formatted as lower camelcase (as opposed to upper camelcase, which is currently the only option). With this patch, simply passing :camelize => true still begets the current behavior, but you can now enable lower
2010 Sep 23
1
Patch to fix docs for auto_link
Hi I''ve contributed a patch which fixes an incorrect example in the documentation for auto_link in ActionView::Helpers::TextHelper. The example uses truncate in the old style of tuncate(text, length) which no longer works, so I''ve patched it to use the new tuncate(text, :length => n) style.
2008 Sep 02
1
Deploying Rails patches (diff)
I am having a problem with a belongs_to and a has_one :through relation which I found is a known bug in Ruby on Rails: http://rails.lighthouseapp.com/projects/8994/tickets/323-has_many-through-belongs_to_association-bug This ticket has 6 different attachments. Do I need all of them, or just the latest one? I can''t seem to find anywhere how one is supposed to deploy these patches.
2010 Sep 23
1
[patch] Properly memoize protected methods
This patch fixes an issue with protected methods becoming public if they are memoized. Looking for +1''s and/or a commit by core... https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5695 Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to
2010 Oct 25
1
A few fixes to eager loading issues
Hey all, I''d really appreciate some eyes on https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5845-activerecord-3-eager-loading-fail#ticket-5845-19. There''s a small issue in Rails 3 eager loading, and this ticket has an accompanying patch. Sssociations that show up twice in a Relation chain like: Article.includes(:comments).includes(:comments =>
2010 Mar 05
0
Question/possible bug on ActiveRecord serialize and STI
I''ve been running into a problem where ActiveRecord 2.3.5 isn''t deserializing a serialized column in derived classes: http://pastie.org/856463 I''ve been able to replicate this test with Ruby 1.8.6p369, 1.8.7p72, and 1.8.7p174 on different systems, any thoughts? Dustin Lundquist -- You received this message because you are subscribed to the Google Groups