Hi there,
I have a little trouble figuring out this error:
undefined method parent' for []:Array #{RAILS_ROOT}/app/controllers/forums_controller.rb:42:in
new’
This is my def new in my controller
def new
@menu_current = “forum”
@page_title = “Kampp Productions - Forum - Opret ny”
@forum = Forum.new
@parent = params[:parent]
if @parent
@parentForum = Forum.find_by_sql(“select * from forums where
parent = ‘“[email protected]_s+”’”)
@topForum = Forum.find_by_sql(“select * from forums where parent =
‘“[email protected]_s+”’ limit 1”)
end
end
Does anyone have any idear whats wrong ?
- Emil