Displaying 1 result from an estimated 1 matches for "posttitl".
Did you mean:
posttitle
2005 Dec 23
2
has_many and belongs_to relationship error
...here clause'':
SELECT * FROM posts WHERE (posts.user_id = 4)
Extracted source (around line #10):
7: <div class="separator"> </div>
8: <% end %>
9:
10: <% for post in @posts %>
11: <div class="mission">
12: <h3><%= h(post.posttitle) %></h3>
13: <%= post.posttext %>
The code follows:
class Post < ActiveRecord::Base
belongs_to :user
end
class User < ActiveRecord::Base
has_many :posts
end
class BlogController < ApplicationController
def index
@user = User.find_by_login(''bilal'...