Skip to content

Instantly share code, notes, and snippets.

@acconrad
Created March 12, 2011 01:00
Show Gist options
  • Save acconrad/866886 to your computer and use it in GitHub Desktop.
Save acconrad/866886 to your computer and use it in GitHub Desktop.
= 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...
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