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
require 'spec_helper' | |
describe 'A review' do | |
it "belongs to a Movie" do | |
movie = Movie.create(movie_attributes) | |
review = movie.reviews.new(review_attributes) | |
expect(review.movie).to eq(movie) |
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
// Place all the styles related to the Reviews controller here. | |
// They will automatically be included in application.css. | |
// You can use Sass (SCSS) here: http://sass-lang.com/ |
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
$primary-background-color: #F5F5F5; | |
$secondary-background-color: #237CBE; | |
$primary-text-color: #444; | |
$secondary-text-color: #777; | |
$primary-link-color: #2E6AA0; | |
$secondary-link-color: #FFF; | |
$errors-background-color: #FFC; | |
$errors-text-color: #DC3D3D; | |
$subdued-color: darken($primary-background-color, 20%); | |
$flash-notice-color: #DBFFDD; |
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
<%= link_to 'Delete Account', @user, | |
method: :delete, | |
data: { confirm: 'Are you sure you want to permanently delete your account?' }, | |
class: 'button' %> |
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
@import "colors"; | |
img { | |
border: 0; | |
border-width: 0; | |
} | |
ul, | |
ol { | |
margin: 1em 0; |
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
<% flash.each do |key, value| %> | |
<%= content_tag(:p, value, :class => "flash #{key}") %> | |
<% 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
<% flash.each do |key, value| %> | |
<%= content_tag(:p, value, :class => "flash #{key}") %> | |
<% 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
<%= form_for(@movie) do |f| %> | |
<%= render "shared/errors", object: @movie %> | |
<fieldset> | |
<ol> | |
<li class="required"> | |
<%= f.label :title %> | |
<%= f.text_field :title, autofocus: true %> | |
</li> | |
<li class="required"> | |
<%= f.label :description %> |