user3432362
user3432362

Reputation: 13

Understanding Ruby Rendering

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.

  1. Are there any good tutorials in this area?

  2. Is it relatively easy to add graphs from the same table on to the home page?

  3. Is it possible to make the homepage refresh when ever a change occurs in the database table?

  4. 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

Answers (3)

Sonu Oommen
Sonu Oommen

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

Veeru
Veeru

Reputation: 356

  1. For Rails Tutorials you can find out these http://www.tutorialspoint.com/ruby-on-rails/ http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

  2. 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

SSR
SSR

Reputation: 6438

  1. Read this tutorial on basics how to render templates in ror.

http://guides.rubyonrails.org/layouts_and_rendering.html

http://api.rubyonrails.org/classes/AbstractController/Rendering.html

  1. For chart you can use this, github.com/ankane/chartkick

  2. 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

Related Questions