August 17th, 2010 – 09:00 AM
I have created a Rails3 application, started with Haml/Sass and finding it awesome. I am also trying to do unobtrusive javascript.
Before, in Rails 2.3, I would have expected a remote-form to have an :update attribute, where you could specify a selector where the response of the remote method would be rendered.
Now it needs to be [...]
July 27th, 2010 – 07:27 AM
For Test::Unit there is a module called skippy, that allows you to skip for instance slow tests.
I was looking for a way to achieve the same in Rspec. I am currently developing against Rails 3.0.0.rc, and using rspec 2.0.0.beta.19 and could not find anything. So i asked on the rspec mailing list and got a [...]
June 7th, 2010 – 06:24 PM
I have been having troubles sending e-mails using ActionMailer on windows. The simple code-sample:
my_filename="my_image.jpeg"
attachment "image/jpeg" do |a|
a.body = File.read(my_filename)
a.filename = File.basename(my_filename)
end
did not work. I did find an attachment inside my e-mail, but it was corrupt. It took me a while to figure out it could be something related to my development [...]
May 18th, 2010 – 09:23 AM
I am using a lot of observe_fields in my views. I have two searches on my form, one with two fields one with four, and every time a user types something the observe_field is triggered and some search is executed via AJAX. To make sure the user knows what is going on, i use a [...]
May 17th, 2010 – 09:59 AM
I am switching back from using thin inside a service to mongrel_service, because when my thin-process is killed somehow, the service stills seems to be running. Mongrel_service can cope with this much better: it also keeps a check on your ruby process and restarts it if needed (at least in the old version, i hope [...]
May 11th, 2010 – 01:37 PM
Up until now i was able to somehow circumvent the need to access the current-user in the model, by calling methods from the controllers and handing down the current-user.
In the MVC pattern, the model should know as little as possible about things the controller handles.
But now, i need a method that will check :before_save what [...]
Went to arrrrcamp last friday (Arrrr as in Ruby, Rails, Radiant and, of course, Rhum!). It was the third edition of this unique ruby-on-rails event, and the third time i visited it ;) So i am a regular :)
The first year i was just starting ruby and my then-collegue and me learned a lot. [...]
March 22nd, 2010 – 08:31 PM
My users showed me the weirdest problem today. In my application is a select-box that allows users to select the classification. When the classification is changed, the div containing the icons for the actions (and the classification-select-box itself) is updated to reflect the new classification. So i use an observe_field to watch the select-box, and [...]
March 9th, 2010 – 11:42 AM
In my Rails application i use a generic application.rhtml for all my pages. Amongst others, this code contains some jQuery code to manipulate my page
var $j = jQuery.noConflict()
$j(document).ready(function() {
// remove all alt-tags
$j("[alt]").removeAttr("alt");
[...]
December 29th, 2009 – 07:34 PM
I am developing Ruby on Rails on Windows platforms mostly. But using Rspec and cucumber on windows has a very strange side-effect: all a’s are missing as can be seen from the following screenshot:
Luckily, after some very extensive googling, i found a single blogpost with a fix!
Apparently it has something to do with UTF-8 [...]