#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0

    If block in HAML and Ruby


    hi all

    im new to Ruby and HAML, and I haven't found any help through SO and Google. I'm trying to show a Twitter feed only on the homepage. Right now, it's showing on all pages except the homepage.

    would appreciate the help

    thanks.

    - if home
    #twitter_feed{"data-userid" => "1570127065"}
    %h2 Twitter Feed
    %ul
    = render "components/twitter_feed"
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    cramming whitespace-sensitive code into a single column by not using CODE tags is a bit ... silly.

    Anyway, there's obviously something wrong with your home variable. But we can't tell you what it is without seeing how it's defined.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by Jacques1
    Hi,

    cramming whitespace-sensitive code into a single column by not using CODE tags is a bit ... silly.

    Anyway, there's obviously something wrong with your home variable. But we can't tell you what it is without seeing how it's defined.
    fark. sorry, Jacques1. i was in a rush and under pressure.

    figured it out. sorry to bother.

IMN logo majestic logo threadwatch logo seochat tools logo