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 HelloController | |
before_filter :find_market | |
def index | |
end | |
private | |
def find_market | |
@market = Market.find(params[:id]) | |
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
gem install zeus | |
zeus start |
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 NilClass | |
def strip | |
to_s.strip | |
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
<div class="products cities-content"> | |
<ul class="unstyled cities-items" style="color:white;"> | |
<% sort_by_sold_out_or_ended(all_products_and_categories.sort_by(&:weighted_position)).each_with_index do|product_or_category, index| %> | |
<%= render product_or_category %> | |
<% end %> | |
</ul> | |
</div> |
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
.crashlytics |
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 Hash | |
def compact | |
delete_if { |k, v| !v } | |
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 Contact | |
def self.all | |
people.collect do |p| | |
{ | |
title: "#{p.first_name} #{p.last_name}", | |
action: :open_contact, | |
image: { image: p.photo } | |
} | |
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
{ | |
:person => [ | |
1 => { :name => "Alan", :location => "Washington, DC" }, | |
2 => { :name => "Mike", Location => "Washington, DC"} | |
] | |
} |
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 make_ids | |
@make_ids ||= normalize_makes.map { |make| make[:id] } | |
end |