I am trying to create a simple Ruby on Rails index page using a table. My intention is to have the page include a HTML table that displays items from the model in each row. The model is called "Post", and it contains four attributes - Department, Professor, Course, and Title.
The problem is, the Table is displayed in a peculiar way as shown in the screenshot of the application at this link: http://i.stack.imgur.com/OkE6M.png.
There is a huge chunk of nonsense texts displaying right above the table. The table itself is being rendered as intended, but I do not understand why the unnecessary text chunk is being displayed. There is no error message when I run the application. The rest of the application is displayed properly and functional.
The source code of the view of the page looks like this:
index.html.erb
All posts
DepartmentProfessorCourseTitles
Upon inspecting the source of the rendered page, I found out that the block of the problematic text is included within the table group. Below is a partial excerpt from the rendered HTML:
* .....more code above *
Quod sed ex fuga nemo.Isabel Douglas IIISint qui natus nesciunt. Qui aperiam voluptas alias molestias nisi.Quod sed ex fuga nemo.Isabel Douglas IIISint qui natus nesciunt. Qui aperiam voluptas alias molestias nisi.[#<Post id: 60, department: "Consequatur voluptatem.", professor: "Humberto Wisozk", course: "Suscipit rerum possimus culpa aut et.", content: "Beatae minima aut est eos.", user_id: 6, created_at: "2014-01-14 20:15:11", updated_at: "2014-01-14 20:15:11", title: "Sed quia.">, #<Post id: 59, department: "Consequatur voluptatem.", professor: "Humberto Wisozk", course: "Suscipit rerum possimus culpa aut et.", content: "Beatae minima aut est eos.", user_id: 5, created_at: "2014-01-14 20:15:11", updated_at: "2014-01-14 20:15:11", title: "Sed quia.">, #<Post id: 58, department: "Consequatur voluptatem.", professor: "Humberto Wisozk", course: "Suscipit rerum possimus culpa aut et.", content: "Beatae minima aut est eos.", user_id: 4, created_at: "2014-01-14 20:15:11", updated_at: "2014-01-14 20:15:11", title: "Sed quia.">, #<Post id: 57, department: "Consequatur voluptatem.", professor: "Humberto Wisozk", course: "Suscipit rerum possimus culpa aut et.", content: "Beatae minima aut est eos.", user_id: 3, created_at: "2014-01-14 20:15:11", updated_at: "2014-01-14 20:15:11", title: "Sed quia.">, #<Post id: 56, department: "Consequatur voluptatem.", professor: "Humberto Wisozk", course: "Suscipit rerum possimus culpa aut et.", content: "Beatae minima aut est eos.", user_id: 2, created_at: "2014-01-14 20:15:11", updated_at: "2014-01-14 20:15:11", title: "Sed quia.">, #<]
* more code below.... *
Below is the Gemfile used for the application:
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.1'
gem 'pg', '0.15.1'
gem 'bootstrap-sass', '2.3.2.0'
gem 'bcrypt-ruby', '3.1.2'
gem "simple_form"
gem 'faker', '1.1.2' # allow us to make sample users
gem 'will_paginate', '3.0.4' # pagination method
gem 'bootstrap-will_paginate', '0.0.9' # configures will_paginate to use Bootstrap's style
group :development, :test do
gem 'sqlite3', '1.3.8'
gem 'rspec-rails', '2.13.1'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
gem 'factory_girl_rails', '4.2.1'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
gem 'jquery-ui-rails'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'rails_12factor', '0.0.2'
end
Why is this happening?