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
@media (max-width: 480px) { | |
/* Mobile CSS goes here */ | |
} |
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
body { | |
background-color: #dbe2ed; | |
} | |
.container { | |
width: 688px; | |
margin-left: 1em; | |
} | |
.white-shadow { | |
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, .8) 4px, rgba(255, 255, 255, .28) 8px); | |
background-image: -moz-linear-gradient(top, rgba(255, 255, 255, .8) 4px, rgba(255, 255, 255, .28) 8px); |
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
!!! | |
%title= "Your Website" | |
%meta{ :charset => "utf-8" } | |
%meta{ :http-equiv="X-UA-Compatible" :content => "IE=edge,chrome=1" } | |
%meta{ :content => "", :name => "description" } | |
%meta{ :content => "", :name => "author" } | |
%link{ :href => "/css/style.css", :rel => "stylesheet" } | |
%header | |
%nav | |
%ul |
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
- @my_list.each do |item| | |
= link_to item.name | |
- unless item == @my_list.last | |
, | |
# how do I comma separate so that there isn't a space after the item? |
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 index | |
if @company | |
@locations = @company.locations | |
@sectors = @company.sectors | |
@openings = @company.openings | |
@reviews = Review.where(:company_id => @company.id) | |
end | |
@review = Review.new | |
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 User < ActiveRecord::Base | |
has_many :widgets | |
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
contents = Content.search('hello world') #returns array, Content has page_id, value, value_type | |
@pages = Page.all(:conditions => {:page_id = contents.page_id} , :order => :overall_rating) |
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
<%= form_for @review do |f| %> | |
<div class="field"> | |
<%= f.label :review_text, "Review:" %><br /> | |
<%= f.text_area :review_text %> | |
...rest of code ignore... |
NewerOlder