23 Feb '12, 2pm

Giving a Rake Task Arguments #Ruby

February 23, 2012 Tagged: ruby rake command line shell Comments (View) Giving a Rake Task Arguments I came across this today. You can write Rake tasks that accept arguments, called like this: rake tweets:send[cpytel] You define the rask task like this: namespace :tweets do desc 'Send some tweets to a user' task :send, [:username] => [:environment] do |t, args| Tweet.send(args[:username]) end end Unfortunately, zsh can’t parse the call to the rake task correctly, so you’ll see the error: zsh: no matches found: tweets:send[cpytel] So you’ll need to run it like this:

Full article: http://robots.thoughtbot.com/post/18129303042/giving-a-ra...

Tweets

Rake tasks can take arguments

robots.thoughtbot.com 23 Feb '12, 10pm

February 23, 2012 Tagged: command line rake ruby shell how to Comments (View) How To Use Arguments In a Rake Task I came a...

TV hunk Dai Yang Tian is looking for a date - and we're giving him a hand

TV hunk Dai Yang Tian is looking for a date - a...

tnp.sg 24 Feb '12, 2am

Channel 8 star Dai Yang Tian has thrown TNP a challenge: Find me my lady love. A recent car accident has made him more dar...

Arguments Against Dolphin Slaughter For years a...

dotearth.blogs.nytimes.com 25 Feb '12, 2pm

The film is an astonishing achievement. On your question about our relationship with fellow species, this question can be ...

@kei_s 参考になるかわかりませんが、最近Pivotal Labsブログにこんな記事があり...

pivotallabs.com 17 Feb '12, 7am

There are several reasons why you should test your Rake tasks: Rake tasks are code and as such deserve testing. When untes...

@Joceeel the third one right?!!!

primadeli.com 28 Feb '12, 2pm

Vegetable gelatine is used in PrimaDéli cakes