Ruby on Rails Friday, February 10, 2017

On 10 February 2017 at 11:02, 'krfg' via Ruby on Rails: Talk
<rubyonrails-talk@googlegroups.com> wrote:
> In app/controllers/static_pages_controller.rb the following variables (among
> others) are defined:
>
> def home
> if logged_in? && !current_user.gamer?
> ...
> elsif logged_in? && current_user.gamer?
> ...
> @week_num = Time.now.strftime("%W").to_i
> @atp_tournaments = AtpCalendar.where("week @> ?",
> "{#{@week_num}}")


Did you understand my previous post when I suggested that you should
quote the previous message when replying?

Put some debug code to check that it is getting to the line above. You
can use logger.info and the result will be printed in the log. So
something like
logger.info("atp tournaments count = #{@atp_tournaments.count}"

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLu%3DWSFxGSxKv3OxW1TBE0k7a4q6G2CJYneVd4Mgc8YXGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment