-
2007-05-09
"I just noticed that the mapping between PostgreSQL’s Time Without TimeZone column type maps to Rubys standard Time class. Which gives the following behavior in script/console:
:::ruby >> t = TimeEntry.find(1) >> t.time => Sat Jan 01 23:00:00 +0100 2000 >> t.time = Time.now => Wed May 09 19:02:07 +0200 2007 >> t.save => true >> t = TimeEntry.find(1) >> t.time => Sat Jan 01 19:02:07 +0100 2000 Am I very anal to find this … sloppy?"
-
2007-04-27
"Reading this a little bit earlier would have saved me a lot of time. In short: callbacks such as :before_add does not work with has_many :through, and the documentation does not tell you that. To get callbacks, add them to the join model."
-
2007-04-17
"The current incarnation of autotest seems to assume that you are using integrated views. If not, you can modify the rspec_rails_autotest.rb file to run the view specs as well:
:::ruby # when %r%^app/views/layouts/(.*)\.rhtml% then # ["spec/views/layouts/#{$1}_spec.rb"] when %r%^app/views/(.*)\.rhtml$% then ["spec/views/#{$1}_view_spec.rb"] Your view spec must be postfixed with “_view_spec.rb” for it to work
Update This works out of the box now."
-
2007-03-30
"I am getting all parts of my Rails development environment settled. In addition to vanilla Rails, I am currently using RSpec, Selenium and Autotest. I am seriously considering Haml and Sass as well.
When googling arounf to learn more about Autotest, I realized that people are using together with Growl. It works out-of-the-box with Test::Unit, but RSpec needs a little tweaking. I took the basics from here and modified to my liking."
-
2006-05-09
"I will be speaking on the Rails Recipes Meetup here in Stockholm tomorrow. My topic will be on recipe 28 in Chads excellent book, how you can use with_scope to DRY your code.
Whilst I have looked quite deeply into the subject - it is quite small actually - there is one thing I have yet to find out. Chad mentions that you can use wrap your actions with scoping using a before_filter."
-
2005-04-14
"I feel I just have to try Ruby on Rails, I mean everybody else is doing it and I don’t want to feel left out.
So I started setting it up on my X40 which runs Ubuntu. There is still no deb available for it, you have to use the Ruby Gems system to set it up. I dont know if this is good or bad - it seems like a Ruby CPAN and my feelings towards Perls CPAN are mixed."