SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    page 235 of Simply Rails 2

    I have followed all of the code exactly to the letter and checked for typos.
    This portion of the book deals with rendering partials. For some reason the contents of my partial are not being displayed but I am getting no errors from the server. plain text is showing but the contents of the partial are not. is there a setting i am missing somewhere?

  2. #2
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Rendering stories/show
      SQL (0.1ms)   SELECT count(*) AS count_all FROM "votes" WHERE ("votes".story_id = 3) 
      CACHE (0.0ms)   SELECT count(*) AS count_all FROM "votes" WHERE ("votes".story_id = 3) 
      Vote Load (0.2ms)   SELECT * FROM "votes" WHERE ("votes".story_id = 3) 
    Rendered votes/_vote (33.3ms)
    is says the partial is being rendered but no display???

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Location
    Cleveland, OH
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm going to guess when you are calling your partial, you forgot an = sign.

    Call should be
    Code:
    <%= render :partial ... %>

  4. #4
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm an idiot. thank you.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Location
    Cleveland, OH
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that one will pop on you again, guarantee it


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •