ERB vs HAML conversion of an if condition?
HAML is indentation based, and the parser can be tricky. Replace
- if current_user= link_to 'Edit Profile', edit_user_path(current_user.id)= link_to 'Logout', logout_path- else= link_to 'Register', new_user_path= link_to 'Login', login_path
with
- if current_user = link_to 'Edit Profile', edit_user_path(current_user.id) = link_to 'Logout', logout_path- else = link_to 'Register', new_user_path = link_to 'Login', login_path
and give it a try. Notice how the indentation changed on the link_to lines.
- if current_user = link_to 'Edit Profile', edit_user_path(current_user.id) = link_to 'Logout', logout_path- else = link_to 'Register', new_user_path = link_to 'Login', login_path
for more information about haml files vist
http://rubyonrails-tutor.blogspot.com/2010/02/hamltutorial-for-rails-developers.html