Hello all,
This will be my 3rd month with Ruby on Rails. I do all my developing on
Mac with TextMate.
I’m now totally confused.
I have a one to one relationship. Projects and study_type
-
project model -
belongs_to :study_type -
study_type model -
has_one :project
I can display correct data in my “show” method but not on the “index”
- project_controller -
def indexSearchLogic
@projects = Project.search_all_projects(params[:search],
params[:page])
end
def show
@project = Project.find(params[:id])
end
- index.html.erb -
part of table
<% @projects.each do |project| %>
<% end %>
- show.html.erb -
part of table
I’m not sure what I’m doing wrong.
Thanks for any advice or help.
JohnM