radar/forem — Issue #118: NameError in Forem/forums#index
Author: Akram-Khan
Created: 2012-01-06 18:12:17+00:00
State: open

Hi,

I installed forem today and was trying to get it working but am stuck at this issue.

This problem does not occur if I login and then try to go to localhost:3000/forums. I am using devise for authentication.

I checked the demo app which is deployed on Heroku and replaced "signup_path" with "'/users/sign_up'" and did the same thing with the login path and the app works.

This causes more trouble if I am using a custom authentication method and try to call the form from multiple places.

Here are my devise routes :-

devise_for :users do
get "/signup" => "devise/registrations#new"
get "/login" => "devise/sessions#new"
get "/logout" => "devise/sessions#destroy"
end

Here is the details from the log file :-

ActionView::Template::Error (undefined local variable or method `signup_path' for #<#:0xb8ea548>):
4:	=link_to logo, root_url
5:	.three.columns
6:	-if current_user.blank?
7:	=link_to "Sign Up",signup_path, :class=> "small radius nice green button"
8:	=link_to "Login",login_path, :class=> "small radius nice blue button"
9:	.three.columns
10:	=form_tag "/search", :method =>"get" do
app/views/layouts/_above_header.html.haml:7:in `_app_views_layouts__above_header_html_haml___982755214_82209660'
app/views/layouts/application.html.erb:12:in `_app_views_layouts_application_html_erb__889993777_968552

Thanks,
Akram