Reputation: 13
I am very new to ruby on rails and I am using Ruby version 1.9 and its newer syntax.
I have managed to create a small application where I store statistics in 1 large database table. This table can be viewed and edited with no problems via rails.
Now, I am trying to add several different mini views of this table to the Home page, Where I might list the top 10 users by upload then download.
I have successfully created the 1st for upload, is there away I can use the same code with different query options.
Are there any good tutorials in this area?
Is it relatively easy to add graphs from the same table on to the home page?
Is it possible to make the homepage refresh when ever a change occurs in the database table?
I know I am probably asking very basic questions so any pointers to good tutorials or books would be of great help.
Upvotes: 0
Views: 85
Reputation: 1183
Give this a try. The Rails View: Create a Beautiful and Maintainable User Experience - by John Athayde and Bruce Williams
http://pragprog.com/book/warv/the-rails-view
Upvotes: 0
Reputation: 356
For Rails Tutorials you can find out these http://www.tutorialspoint.com/ruby-on-rails/ http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
Coming to Charts you can use gruff gem it is very easy to implement and for dynamic charts you can go for highcharts
http://www.highcharts.com/ https://github.com/topfunky/gruff
Upvotes: 0
Reputation: 6438
http://guides.rubyonrails.org/layouts_and_rendering.html
http://api.rubyonrails.org/classes/AbstractController/Rendering.html
For chart you can use this, github.com/ankane/chartkick
Page should refresh when any changes detected in database, for that you can visit ActionController::Live of rails casts.
http://api.rubyonrails.org/classes/AbstractController/Rendering.html
Upvotes: 1