uses new hash syntax by default
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 %>
|
||||
Reference in New Issue
Block a user