I am not able to show data in the view. I don't know why? When I do this in view
<%= @p.inspect %>
It shows me this in view
#<ActiveRecord::Relation [#<Post id: 1, Title: "My First Post", Text: "The world with out worries", CommentsCounter: 1, LikesCounter: 1, created_at: "2022-09-17 21:41:08.544136000 +0000", updated_at: "2022-09-17 21:41:08.544136000 +0000", author_id: 1>]>
This is the controller function
def detail
@p = Post.where(id: params[:id]).where(author_id: params[:idp])
end
But when I try to show only the title like
@p.Title
it shows this error
