search for: foca

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

Did you mean: focal
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 .
2012 Jul 20
8
sti_object.becomes(Parent) unexpectedly mutating the receiver
I ran into an interesting issue today with ActiveRecord''s becomes method and discovered that it is mutating the receiver without me knowing it. The API docs<http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-becomes>say "The new instance will share a link to the same attributes as the original > class. So any change to the attributes in either
2009 Oct 14
14
spec-ing private methods?
...> design flaw (you are doing too much in your class). > Scott 3 is ok. A "private" method just means it''s an implementation detail that is outside of your API. If you are aiming to test the behavior of your API, then you don''t care about implementation details. -foca > > am I? > > thanks in advance, > joaquin > > -- > www.least-significant-bit.com > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > __________...
2012 Jul 17
6
Database connection parameters are tied to the filesystem
HI Guys, I recently tried VERY hard to override the database configuration bassed on ENV vars or actual API calls. This task is almost next to impossible. I know that the database.yml file is parsed as ERB but that is sane for simple ENV replacement if you want to actually change which database adaptor it is (requires extra config/params) it becomes messy. I found
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create a simple login test from cucumber features. The feature statement is: Given the user is not logged in The step definition for this is confounding me. In the application_controller the authlogic tutorial recommends the following: private def require_user unless current_user store_location flash[:notice] =