1. Public protected private
Many things in Ruby is just method!
Executes cmd in a subshell, returning true if the command was found and ran successfully, false otherwise. An error status is available in $?. The arguments are processed in the same way as for Kernel:: exec.
system("echo *") system("echo", "*") # echo "*"
config.h main.rb *
Returns the standard output of running cmd in a subshell. The built-in syntax% x (...) uses this method. Sets $? To the process status.
`date` #=> "Wed Apr 9 08:56:30 CDT 2003\n" `ls testdir`.split #=> "main.rb" `echo oops && exit 99` #=> "oops\n" $?.exitstatus #=> 99
When do you need to do reload? When you hold a object whose state may be changed by others.
5. Render: partial => 'shared / search', locals => (: objects => ...)
Why do we need locals? Partial is designed for reuse, so, you donot have to have the same name instance variable in your action, and locals make the reuse possible.