Online Regex editor

May 14th, 2010

For some reason, ruby developers always comes out with the best things!

http://rubular.com -  a very useful tool to write and test your regex right away, really useful, you better use it next time you doing regex stuff.

still don’t know the answer for my question (why rubyist comes with the best stuff)

david heinemeier hansson or dhh, is a very nice and creative guy, he is the creator of the beautifull framework Ruby on Rails.

he had a meeting on apple store at regent street and unfortunately i missed it, i called apple store at 6 and they told me its from 5 to 6 :(

Go to your application_controler.rb and add this method


def xxx function
raise function .inspect
end

save the file and restart the server if required, now anywhere in your controller you can do this


xxx User.all

or you can do


xxx params

ofcourse you can name this method what ever you want, but I use xxx because its quick to type and I won’t override other method “no descent application would have such a method called xxx” :)

Are you getting ‘not authorized to access newname’ error?

cd myapp .git/config

 repositoryformatversion = 0
 filemode = true
 bare = false
 logallrefupdates = true
[remote "heroku"]
 url = git@heroku.com:<span style="color: #ff0000;">newname</span>.git
 fetch = +refs/heads/*:refs/remotes/heroku/*

change newname to the your project name

push again, it should be fixed

The easier way to send email from rails application, this is what the guys at PostageApp say at their website frontpage, and thats absolutely true.

Last night I was building an app that use Nokogiri gem to do screen scraping for the frontpage of a client website and put it then in a template to be ready for sending through rails mailer.

I have thousands of subscripers in the database, how I’m going to make rails mailer send the message to all of them, phplist used to take several houres to finish, should I use cronjob or what?

http://postageapp.com do it for you, with few easy steps their plugin will be installed and with no configuration at all, postageapp will do the dirty work between your rails app and the mail server.

really really nice plugin,
rails developers keep surprising us everyday.