Reputation: 11
I have implemented the google page speed on rails 4 with the help of pagespeed gem but I am getting my result on console. I want this result on my view page.
Controller code:-
@request = PageSpeed::Request::new("www.google.com", 'api key', 'desktop')
puts @request.pagespeed
Upvotes: 1
Views: 40
Reputation: 1656
The instance variable @request defined in your controller will be available in your views as
<%= @request %>
for pagespeed
<%= @request.pagespeed %>
Upvotes: 1