RailsCasts Pro episodes are now free!

Learn more or hide this

bUg.'s Profile

GitHub User: slbug

Comments by bUg.

Avatar
ruby
@current_user ||= User.find(session[:user_id]) if session[:user_id]

Same stuff as

ruby
if @current_user.nil? && session[:user_id]
  @current_user = User.find(session[:user_id])
end
Avatar

first one works well under ruby 1.9

Avatar

The main problem - how can i give a link to a some comment?