On May 12, 12:29 pm, simonm <[email protected]> wrote:
> Hi
>
> Many thanks for the response. I've changed my view to this and I now
> can't see the recent tweets but am left with the hash still. Why am I
> finding this so complicated!?!
>

You removed the wrong equals

Fred
> <%= @user.twitter_token.timeline.each do |t| %>
> <% t.text %>
> <br>
> <% end %>
>
> Simon
>
> On May 12, 11:55 am, Frederick Cheung <[email protected]>
> wrote:
>
>
>
> > On May 12, 9:23 am, simonm <[email protected]> wrote:
>
> > > I'm really struggling to find some information about extracting
> > > relevant information from my hash output from twitter.
>
> > > My model contains:
>
> > >   def timeline
> > >     @timeline = client.home_timeline
> > >   end
>
> > > And my view:
>
> > > <%= @user.twitter_token.timeline.each do |t| %>
>
> > Don't use <%= here - it will dump the result of the expression (which
> > in the case of .each is the entire collection that was iterated over)
> > into the view, which isn't what you want
>
> > Fred
>
> > > <%= t.text %>
> > > <br>
> > > <% end %>
>
> > > I was hoping to extract just my text from the hashie but it doesn't
> > > quite work... I get my tweets on separate lines which is great,
> > > followed by the hash again...
>
> > > [<#Hashie::Mash contributors=nil coordinates=nil created_at="Wed May
> > > 04 18:57:32 +0000 2011" favorited=false geo=nil id=65852579048980480
> > > id_str="65852579048980480" in_reply_to_screen_name=nil
> > > in_reply_to_status_id=nil in_reply_to_status_id_str=nil
> > > in_reply_to_user_id=nil in_reply_to_user_id_str=nil place=nil
> > > retweet_count=0 retweeted=false source="web" text="what's happening?"
> > > truncated=false user= ...
>
> > > How on earth can I stop this?!
>
> > > Thanks,
>
> > > Simon

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to