Created
March 12, 2011 01:00
-
-
Save acconrad/866886 to your computer and use it in GitHub Desktop.
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
= render :partial => "companies/menu", :locals => { :company => @company, :locations => @locations, :sectors => @sectors, :openings => @openings } | |
%h2= "#{@company.name} > Reviews" | |
#reviews | |
- if @reviews.count > 0 | |
- @reviews.each do |review| | |
%p | |
" | |
= review.review_text | |
" | |
- else | |
%p No reviews yet. Why not leave your own? | |
#new_review | |
= form_for(@review) do |f| | |
.new_review_field | |
...rest of the gist... |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment