search for: acts_lik

Displaying 5 results from an estimated 5 matches for "acts_lik".

Did you mean: acts_like
2007 Jun 15
4
Environment reuse
...ations occur for continuous-integration or staging boxen that should look an awful lot like development (or production), but not quite. In order to make these sorts of situations pleasantly self-documenting, I''ve patched the Initializer with a little helper: # config/environments/live.rb acts_like :development Is this a patchworthy feature? I''d be happy to submit my change and tests if other people see any value here. As this changes Rails'' initalization process, it''s a bit difficult to elegantly expose as a plugin. ~ j. --~--~---------~--~----~------------~--...
2007 Mar 06
15
mocking missing methods
Hi folks. So I''m using mocha on a ruby project, and I really like it. One thing I''ve noticed is that it can be a bit "surprising" when I''m mocking methods that don''t exist on an object, and I think there''s an easyish fix. At the moment, you use sheep = mock() to create a mock sheep. What I''d like to do is something like sheep =
2013 Apr 28
2
[ActiveSupport] Add a "remaining_to" method to date class
Just that: class Date > def remaining_to(date) > if date.acts_like? :date > date - self > end > end > alias :days_to end and then be able to do this: Date.today.remaining_to(Date.parse ''2014-04-02'').days.seconds -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Co...
2008 Dec 20
9
Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)
I have been working through an upgrade of my 1.2.6 application to 2.2.2. I am almost there but I have hit a problem with ActiveRecord. Before the upgrade, the following code was working fine. def create_root(administrator) root = create_root_collection(self.pingee_name, administrator,
2010 Aug 13
4
Rails and Oracle - can select date but cannot save
I''m seeing a behavior in Rails that I find very strange. Having worked quite a bit with Oracle with other languages I would always dutifully do ALTER SESSION SET NLS_DATE_FORMAT = <my_date_format> and ensure I use that date format in my application. With Rails I still have not figured out how to execute an ALTER SESSION statement after connecting to the database (I''m using