This file contains 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
<div class='main-content'> | |
<h2 class='greeting'>Free hi-res stock images for both personal & commercial use.</h2> | |
<ul class='optionsnavi'> | |
<li class='dropdown'> | |
<button class='dropbtn'> | |
Sort By <i class="fa fa-sort-desc" aria-hidden="true"></i> | |
</button> | |
<div id='myDropdown' class='dropdown-content'> | |
<%= link_to "Latest", :sort => "created_at asc" %> |
This file contains 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 genderized_comment | |
comment.gsub(/HESHE/, gender_pronoun.capitalize) | |
end | |
def gender_pronoun | |
gender == 'female' ? 'she' : 'he' | |
end |
This file contains 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
params = {} | |
room = { wall:"red", size:4 } | |
params[:house] = room | |
puts params[:house][:wall] # => 'red' |
This file contains 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
Content::LibraryPage.each { |c| puts c.live.title if c.live.title.in?(months) } |
This file contains 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
# The error message | |
undefined method `comments_path' for #<#<Class:0x007f01f0513be8>:0x00000003b43928> | |
Did you mean? font_path | |
Extracted source (around line #1): | |
1 | |
2 | |
3 | |
4 |
This file contains 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 LoggerKhan < Logger | |
def add(severity, message = nil, progname = nil) | |
return super unless severity == 'info' && "#{message}" =~ /some_tag/ | |
redis_logger.add(severity, message, progname) | |
end | |
private | |
def redis_logger | |
@redis_logger ||= Logger.new Rails.root.join('log', "redis_#{Rails.env}.log") |
This file contains 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
puts 'holy shit it worked' |
This file contains 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 ApprovedStep < ActiveRecord::Base | |
# you'd probably want to put your structured data here | |
end |
This file contains 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 Login < ActiveRecord::Base | |
def self.average_seconds_to_login | |
average :time | |
end | |
end |
This file contains 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
<a data-role="collapsible" data-theme="f" data-iconpos="right" data-collapsed-icon="arrow-d" data-expanded-icon="arrow-u" class="inline-collapsible dark-border"> | |
<h3>Categories</h3> | |
<fieldset data-role="controlgroup"> | |
</fieldset> | |
</a> |