similar to: how to get day name using ActiveSupport libraries

Displaying 20 results from an estimated 8000 matches similar to: "how to get day name using ActiveSupport libraries"

2006 Apr 10
0
Plugins & ActiveSupport::CoreExtensions
Is it possible to add to ActiveSupport''s CoreExtension module via a plugin? The only way I''ve been able to do this is to add my extensions to a library stored in the lib folder. Thanks. -- DeLynn Berry delynn@gmail.com http://www.delynnberry.com
2006 Jul 17
2
european date format
hi, overhere users go nuts if they have to enter the date in iso format, so i have to make my applications in such a way that not only dates are displayed in the "dd-mm-yyy" format but also can be entered in that way. somewhere i found this code to put in the environment script: ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.update( :default => ''%d/%m/%Y
2009 Jun 15
1
calendardateselect problem
I am using http://code.google.com/p/calendardateselect/ for my date time picker. I am using dd.mm.yyyy format (:finnish) and i am using ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge! (:default => "%d.%m.%Y") ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge! (:default => "%d.%m.%Y %H:%M") in my enviroment. Everything is working
2006 Sep 28
1
[Newbie] Trying to use Inflections in a non active record class
Hi Sorry if this is too silly to ask. I did RTFM and didn''t find anything obvious. I have a helper class for my controller which needs to singularize words. I need to access methods in the ActiveSupport/CoreExtensions/String/Inflections class. Doing a require ''ActiveSupport/CoreExtensions/String/Inflections'' fails. How do I add this specific class to a helper class
2007 Nov 02
0
DATE_FORMATS and functional tests
I have the following in my environments.rb file: my_formats = { :msc => ''%d %b %Y %I:%M %p'', :msc_short => ''%d %b %Y'' } ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge! (my_formats) ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge! (my_formats) With this, things like
2006 Dec 03
0
How to best change the default value of dasherize (using Edge Rails, and knowing about :dasherize => false)?
Hi all, I''m trying to turn off dasherize in all cases, since converting underscores to hyphens breaks the way that I want to handle XML (with E4X in Flex 2). I''ve read the other threads about dasherize on this list. I''m on Edge Rails, so I can successfully turn off dasherize for a single usage with something like render :xml => @task.to_xml(:dasherize => false)
2006 Mar 23
5
Custom date format
Hi, I''ve followed these directions : http://railswiki.pdxruby.org/HowToDefineYourOwnDateFormat.html It seems pretty straightforward but obviously it doesn''t work for me... article.date_edited.to_formatted_s(:my_format_1) produce a default formatted date, not the one I''ve defined in environment.rb : ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(
2006 Jul 31
2
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
2009 Feb 20
3
Years gone by (deprecation of years method)
Can anyone give me some insight as to why the ActiveSupport::CoreExtensions::Float::Time method ''years'' is being deprecated? I have an application managing contracts and being able to manipulate and report on them based on the number of years the contract lasts, is very convenient. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~
2011 Feb 04
5
Date parse - month and day reversed
I am getting the month and day reversed in parsing a date. I am wondering if there is some intelligence in Ruby that knows that at the moment I am in Mexico, as the parsing is working as if I was "6/15/2008".to_date => ArgumentError: invalid date "15/6/2008".to_date => Sun, 15 Jun 2008 What I really want is my date to be understood as month/day/year. Is there a way to
2008 Jun 26
1
Undefined method: camelize
Hi, I am fairly new at Rails, and attempting to deploy an application that''s running fine using InstantRails on my PC. On the deployment server (I use railsplayground.net), I get the following error: Processing ApplicationController#index (for 220.224.229.156 at 2008-06-25 18:49:34) [GET] Session ID: 5921e7d789ee3aaa214f2d59aa40986a Parameters: {"action"=>:index,
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
2006 Oct 09
1
error running 'ruby script/console' => "uninitialized constant RAILS_ROOT" ??
Hi, Anyone suggest why when I try to run the console via ''ruby script/console'' I get the following "uninitialized constant RAILS_ROOT" ?? Error: ================================ V:\Source\testapp>ruby script\console Loading development environment. ./script/../config/../config/environment.rb:3:NameError: uninitialized constant RAILS_ROOT
2009 Apr 15
1
uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
I''m on debian etch w/ ruby1.8, activesupport-2.3.2, getting this on the first line of code which is require ''active_support'' : /var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require''
2012 Jan 23
0
Problem loading modules through ActiveSupport on_load
Working with modules to group certain methods. Currently I have this set up and it works: **# app/models/a.rb** class A has_history end **# lib/history.rb** module History module Model def self.included(base) base.send :extend, ClassMethods end module ClassMethods def has_history(options = {}) send :include,
2009 Dec 08
0
ActiveSupport 2.3.5 and json 1.2.0 gem
Hey, I''ve tried every trick I can find, yet I''m still unable to get the json gem and ActiveSupport to play nice. No matter in which order I load json and active support, I still end up with: NoMethodError: undefined method `[]'' for #<JSON::Ext::Generator::State:0x104b7fac0> I''m trying to use the JSON object directly, *not* as a ActiveSupport backend:
2008 Mar 20
2
"can't activate activesupport" error
Hi, I''ve got a production server with rails 1.2.3 installed. Previously my app had frozen rails 1.2.3 as well. I decided to update frozen rails to 1.2.6. Deployment went fine until rake task was executed, which resulted in the following error: rake aborted! can''t activate activesupport (>= 1.4.4), already activated activesupport-1.4.2] On the server there''s
2011 Jul 22
2
ActiveSupport not including i18n?
Went to use ActiveSupport in a gem today and got an error on account of not having i18n installed. Either bundler should be installing i18n along with activesupport or docs need to be updated. quick repro: https://github.com/softwaregravy/repro_active_support_i18n bundle exec irb require ''active_support/all'' detailed steps and error: 1) add to Gemfile require
2011 Jul 22
2
ActiveSupport not including i18n?
Went to use ActiveSupport in a gem today and got an error on account of not having i18n installed. Either bundler should be installing i18n along with activesupport or docs need to be updated. quick repro: https://github.com/softwaregravy/repro_active_support_i18n bundle exec irb require ''active_support/all'' detailed steps and error: 1) add to Gemfile require
2011 Mar 28
0
undefined method "load_paths" for ActiveSupport::Dependencies:Module Error
I''m writing a Rails plugin from scratch and recently generating models inside it. In fact, i''m trying to follow the guide from http://guides.rubyonrails.org/plugins.html so i used the following code taken from this site in order to make the models appear like files in the main app directory (as it was said) this is the code: %w{ models }.each do |dir| path =