This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if request.headers['User-Agent'].match(/Trident\/7.0(.*)rv:11.0/) %> | |
<%= render 'shared/ie11_banner' %> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ie11-banner__outside-banner-wrapper { | |
position: absolute; | |
display: none; | |
} | |
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { | |
#ie11-banner__outside-banner-wrapper {display:flex;} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WelcomeController < ApplicationController | |
require 'open-uri' | |
require 'nokogiri' | |
def find_headline | |
doc = Nokogiri::HTML(open("https://www.washingtonpost.com/")) | |
@headline = doc.css('.headline').first.text | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WelcomeController < ApplicationController | |
require 'open-uri' | |
require 'nokogiri' | |
def find_headline | |
doc = Nokogiri::HTML(open("https://www.washingtonpost.com/")) | |
@headline_class = doc.css('.headline') | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WelcomeController < ApplicationController | |
require 'open-uri' | |
require 'nokogiri' | |
def find_headline | |
doc = Nokogiri::HTML(open("https://www.washingtonpost.com/")) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WelcomeController < ApplicationController | |
require 'open-uri' | |
require 'nokogiri' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionMailer::Base.smtp_settings = { | |
:user_name => 'your_sendgrid_username', | |
:password => 'your_sendgrid_password', | |
:domain => 'yourdomain.com', | |
:address => 'smtp.sendgrid.net', | |
:port => 587, | |
:authentication => :plain, | |
:enable_starttls_auto => true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def route | |
route = HTTParty.get("https://www.mountainproject.com/data/get-routes? | |
routeIds=105717718&key=#{Rails.application.credentials.mountain_project_secret}") | |
@name = route.parsed_response["routes"][0]["name"] | |
@rating = route.parsed_response["routes"][0]["rating"] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>This route is called <%= @name %> and it is rated <%= @rating %>.</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def route | |
route = HTTParty.get("https://www.mountainproject.com/data/get-routes?routeIds=105717718&key=398nkdou-3oj3jlknnnflijflj") | |
@name = route.parsed_response["routes"][0]["name"] | |
@rating = route.parsed_response["routes"][0]["rating"] | |
end |
NewerOlder