Fix conflict

This commit is contained in:
Juanjo Bazán
2015-07-18 21:58:43 +02:00
6 changed files with 18 additions and 18 deletions

View File

@@ -1,10 +1,10 @@
class Comment < ActiveRecord::Base
acts_as_nested_set :scope => [:commentable_id, :commentable_type]
acts_as_nested_set scope: [:commentable_id, :commentable_type]
validates :body, :presence => true
validates :user, :presence => true
validates :body, presence: true
validates :user, presence: true
belongs_to :commentable, :polymorphic => true
belongs_to :commentable, polymorphic: true
belongs_to :user
def self.build(commentable, user, body)

View File

@@ -1,7 +1,7 @@
<div style="float:right; margin-right:50px">
<% if user_signed_in? %>
<li>
<%= link_to('Logout', destroy_user_session_path, :method => :delete) %>
<%= link_to('Logout', destroy_user_session_path, method: :delete) %>
</li>
<% else %>
<li>

View File

@@ -1,5 +1,5 @@
Rails.application.routes.draw do
devise_for :users, :controllers => { registrations: 'registrations' }
devise_for :users, controllers: { registrations: 'registrations' }
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".

View File

@@ -2,8 +2,8 @@ class ActsAsVotableMigration < ActiveRecord::Migration
def self.up
create_table :votes do |t|
t.references :votable, :polymorphic => true
t.references :voter, :polymorphic => true
t.references :votable, polymorphic: true
t.references :voter, polymorphic: true
t.boolean :vote_flag
t.string :vote_scope

View File

@@ -1,6 +1,6 @@
class ActsAsCommentableWithThreadingMigration < ActiveRecord::Migration
def self.up
create_table :comments, :force => true do |t|
create_table :comments, force: true do |t|
t.integer :commentable_id
t.string :commentable_type
t.string :title

View File

@@ -42,8 +42,8 @@ feature 'Comments' do
debate = create(:debate)
comment = create(:comment, commentable: debate, user: citizen)
visit debate_path(debate)
login_as(manuela)
visit debate_path(debate)
within "#comment-#{comment.id}" do
fill_in 'comment_body', with: 'La semana que viene está hecho.'