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... |
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
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
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
- @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
!!! | |
%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
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
@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
@media only screen and (-webkit-device-pixel-ratio: .75) { | |
/* CSS for Low-density screens goes here * | |
* Ex: HTC Evo, HTC Incredible, Nexus One */ | |
} | |
@media only screen and (-webkit-device-pixel-ratio: 1) and (max-device-width: 768px) { | |
/* CSS for Medium-density screens goes here * | |
* Ex: Samsung Ace, Kindle Fire, Macbook Pro * | |
* max-device-width added so you don't target laptops and desktops */ | |
} |
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
function addDailyPlayer (element) { | |
if (logged_in) { | |
var $row = $(element).closest('li') | |
, $myTeam = $('#player_confirmation_table').children('tbody') | |
, playerSlotAvailableNew = 0 | |
, useFlex = false | |
, $playerInfo | |
, $playerSlot | |
, playerId | |
, gameId |
OlderNewer