-
Home
Pages
-
Categories
-
Tags
Blogroll
-
RSS Feeds
-
Meta
rails
Rails Pro Tip: Invoke Command Line Commands From Rails Console
So there you have your command line prompt from Bash/Zsh/cmd.exe and
there is so called
Rails console
which is basically IRB prompt with the Rails application loaded.
[...]
Also tagged tipSafe String Interpolation In Ruby
Age-Old Problem
Suppose you want to authenticate user from the login/password entered
on the web from
user = User.first(:conditions => "login = ‘#{ login }’ AND password = ‘#{ password }’")
[...]
Also tagged rubyExploring Latest ruby-lib Additions
Recently I was browsing through the NEWS file in the Ruby Subversion repository. Two methods added since the 1.9.1 release to the Enumerable module caught my attention. These two are Enumerable#chunk and Enumerable#slice_before.
The docs for these are not available at http://ruby-doc.org/ so you’d need to go straight to the source code (by using the links [...]
Also tagged mysql, ruby