-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatting in Gemfile #216
base: master
Are you sure you want to change the base?
Changes from 4 commits
a0b41e8
cf1446f
df485c1
5da1277
c3462b8
f05a0db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
class PollsController < ApplicationController | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trailing whitespace detected. |
||
load_and_authorize_resource only: [:new, :create, :edit, :update] | ||
before_action :authenticate_user! | ||
|
||
# GET /polls | ||
|
@@ -27,12 +28,13 @@ def show | |
# GET /polls/new | ||
# GET /polls/new.json | ||
def new | ||
@poll = Poll.new | ||
@poll = Poll.new | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use 2 (not 4) spaces for indentation. |
||
respond_to do |format| | ||
format.html # new.html.erb | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use 2 (not 4) spaces for indentation. |
||
format.json { render json: @poll } | ||
|
||
respond_to do |format| | ||
format.html # new.html.erb | ||
format.json { render json: @poll } | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at method body end. |
||
end | ||
|
||
# GET /polls/1/edit | ||
|
@@ -43,6 +45,7 @@ def edit | |
# POST /polls | ||
# POST /polls.json | ||
def create | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at method body beginning. |
||
@poll = Poll.new(poll_params) | ||
|
||
respond_to do |format| | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,12 @@ | |
|
||
[email protected] do |poll| | ||
.poll{'data-id' => poll.id} | ||
%h2=poll.question | ||
%h2= poll.question | ||
.publish | ||
=render :partial => "polls/publish_link", :locals => {:poll => poll} | ||
.actions | ||
= link_to 'Show', poll | ||
= link_to 'Edit', edit_poll_path(poll) | ||
= link_to 'Destroy', poll, method: :delete, data: { confirm: 'Are you sure?' } | ||
= link_to 'Edit', edit_poll_path(poll) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
= link_to 'Destroy', poll, method: :delete, data: { confirm: 'Are you sure?' } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [85/80] |
||
|
||
|
||
= link_to 'New Poll', new_poll_path | ||
= link_to 'New Poll', new_poll_path if can? :manage, :polls |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,7 +245,6 @@ | |
uri = URI.parse(current_url) | ||
uri.path.should == root_path | ||
end | ||
|
||
end | ||
|
||
feature %q{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,6 @@ | |
page.should have_css("p", :text => "Poll was successfully updated.", :visible => true) | ||
end | ||
|
||
|
||
end | ||
|
||
feature %q{ | ||
|
@@ -55,4 +54,27 @@ | |
save_and_open_page | ||
page.should have_css(".polls", :visible => true) | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at block body end. |
||
end | ||
|
||
feature %q{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
As a website | ||
I want to make sure, | ||
That non-admin user | ||
Can't create polls | ||
} do | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at block body beginning. |
||
background do | ||
@user = FactoryGirl.create(:user) | ||
venue = FactoryGirl.create(:venue) | ||
@user.school = venue.school | ||
sign_in_manually @user | ||
end | ||
|
||
scenario "Non-admin user is trying to access polls", :js => true do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the new Ruby 1.9 hash syntax. |
||
visit new_poll_path | ||
uri = URI.parse(current_url) | ||
uri.path.should == root_path | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at block body end. |
||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final newline missing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we use unicorn still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably right. Adding back gem.