Top "Activesupport" questions

Active Support is the Ruby on Rails component responsible for providing Ruby language extensions, utilities, and other transversal stuff.

How to add 10 days to current time in Rails

I tried doing something like Time.now + 5.days but that doesn't work, even though I vaguely remember seeing, and being …

ruby-on-rails datetime ruby-on-rails-3 activesupport
Convert UTC to local time in Rails 3

I'm having trouble converting a UTC Time or TimeWithZone to local time in Rails 3. Say moment is some Time variable …

ruby-on-rails ruby ruby-on-rails-3 timezone activesupport
How to encode media in base64 given URL in Ruby

I'm trying to upload an image to PingFM. Their documentation says: media – base64 encoded media data. I can access this …

ruby-on-rails ruby base64 encode activesupport
How to use Active Support core extensions

I have Active Support 3.0.3 installed and Rails 3.0.3 with Ruby 1.8.7. When I try to use 1.week.ago I get NoMethodError: undefined …

ruby-on-rails ruby time extension-methods activesupport
Rails ActiveSupport Time Parsing?

Rails' ActiveSupport module extends the builtin ruby Time class with a number of methods. Notably, there is the to_formatted_…

ruby-on-rails ruby parsing time activesupport
What is mattr_accessor in a Rails module?

I couldn't really find this in Rails documentation but it seems like 'mattr_accessor' is the Module corollary for 'attr_…

ruby-on-rails ruby class module activesupport
How do I avoid the circular argument reference warning in activesupport

How do I avoid the circular argument reference warning in activesupport. Happens on ruby 2.2.0 /home/ec2-user/apps/foo_prod/…

ruby-on-rails activesupport
Rails: get #beginning_of_day in time zone

I have a default time zone setup for the rails application. And an instance of the Date object. How can …

ruby-on-rails date timezone activesupport ruby-on-rails-2
How can I create a new Date instance in Ruby

How can I create a new Date object in IRB with a given date. The following didn't work. 1.9.3p194 :053 > …

ruby-on-rails ruby date datetime activesupport
Rails ActiveSupport: How to assert that an error is raised?

I am wanting to test a function on one of my models that throws specific errors. The function looks something …

ruby-on-rails assert activesupport raise