uses new hash syntax by default

This commit is contained in:
Juanjo Bazán
2015-07-18 21:49:36 +02:00
parent 6d0d895832
commit b6d2a5efd6
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,9 +1,9 @@
<% 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>
<%= link_to('Login', new_user_session_path) %>
<%= link_to('Login', new_user_session_path) %>
</li>
<% end %>