Skip to content

Commit

Permalink
Fixed selector in tweets_controller. Changed formatting in tweets vie…
Browse files Browse the repository at this point in the history
…w to improve readability.
  • Loading branch information
philweber committed Mar 13, 2015
1 parent 1b250e3 commit a9a5b3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/tweets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def index
response = HTTParty.get('http://twitter.com/newrelic')

parsed_data = Nokogiri::HTML.parse response.body
tweetNodes = parsed_data.xpath("//p[@class='js-tweet-text']")
tweetNodes = parsed_data.css(".js-tweet-text")
@nodes = tweetNodes.collect do |node|
node.inner_html
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/tweets/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

<%
@nodes.each do |node|
%><%= node.html_safe %><br><%
%><p><%= node.html_safe %></p><%
end
%>

0 comments on commit a9a5b3c

Please sign in to comment.