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
it "should retrieve all bookings based on attributes" do | |
booking = Factory(:booking, :program => Factory(:program, :id => 1)) | |
report = Factory(:report, :program_id => 1) | |
report.bookings.should include(booking) | |
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 params[:q] | |
@expenses = Expense.all(:select => :description, :group => :description, :conditions => "description LIKE '%#{params[:q]}%'") | |
else | |
if params[:date] | |
@date = Time.parse(params[:date]) | |
@expenses = @current_user.expenses.by_date(@date).all | |
else | |
@date = Time.now.midnight |
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 id="cycle_area"> | |
<div> | |
<img src="img/appo.jpg" /> | |
<h2>Appolicious</h2> | |
<h3>Find mobile apps you'll love</h3> | |
<p>Appolicious now has curated apps! As the mobile app landscape shifts and evolves, Appolicious stays on top with more app discovery features. Users can now create their own collection of applications, souping up the browsing experience. Go on, wrangle up your own set!</p> | |
<p><a href="http://www.appolicious.com">Visit website »</a></p> | |
</div><!-- /one thing to cycle, loop this --> | |
<div> | |
<img src="img/abc.jpg" /> |
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
$(document).ready(function(){ | |
$('#cycle_area').cycle({ | |
fx: 'scrollHorz', | |
speed: 500, | |
timeout: 5500, | |
pager: '#pager', | |
pagerAnchorBuilder: buildThumbnails, | |
easing: 'easeInOutCubic', | |
pause: true | |
}); |
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
<script src="http://www.google.com/jsapi"></script> | |
<script> | |
google.load('jquery','1.4.2'); | |
</script> | |
<script src="js/jquery.easing.1.3.js"></script> | |
<script src="js/jquery.cycle.all.js"></script> | |
<script src="js/portfolio.js"></script> |
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
/* ## Popout --------------------------------------------- */ | |
#pop_out{ | |
display:none; | |
position:absolute; | |
padding:10px; | |
background:#f6f6f6; | |
border:1px solid #ccc; | |
box-shadow:0 2px 25px #999; | |
-webkit-box-shadow:0 2px 25px #999; | |
-moz-box-shadow:0 2px 25px #999; |
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
$('video').each(function(){ | |
img_src = $(this).attr('poster'); | |
height = $(this).height(); | |
width = $(this).width(); | |
$(this).wrap('<div class="video_wrap" style="position:relative; width:'+width+'; height:'+height+';" />'); | |
$(this).after('<img class="video_still" src="'+ img_src +'" style="cursor:pointer; position:absolute; top:5px; left:5px; width:'+width+'; height:'+height+';" />'); | |
}); | |
$('.video_still').live('click', function(){ | |
$(this).prev('video')[0].play(); |
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
#ln 43 | |
<%= f.send(form_value_type, :value, :size => ("40x5" if form_value_type == 'text_area')) %> | |
#### RESOLVED #### | |
# ERROR is: undefined local variable or method `form_value_type' | |
#### RESOLVED BY: including the helper in Refinery::ApplicationHelper |
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 camera_rules_for(venue) | |
allowed, html = [], "" | |
allowed << "Point & Shoot" if venue.point_and_shoot | |
allowed << "SLR" if venue.slr | |
allowed << "Flash" if venue.flash | |
allowed.each do |rule| | |
html += "<li>#{rule} OK</li>" | |
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
source 'http://rubygems.org' | |
gem 'rails', '3.0.3' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'mysql2' | |
# Use unicorn as the web server |