i have a session variable called user_id,i want to store it in a table named blogs t.column :user_id, t.column :title, t.column :body,
i have a form which includes title and body,i can save them in the table, here is my code
def forum if request.post? and params[:blog] @blog = Blog.new(params[:blog]) if @blog.save flash[:notice]=“posted” else flash[:error]=“not posted” end end end