Skip to content
Browse files

Changed hash syntax to 1.9 format since we drop 1.8 support

  • Loading branch information...
1 parent 835b42b commit 514070efc1a3556630cb6934ec99952257580266 @rwz committed
Showing with 7 additions and 7 deletions.
  1. +1 −1 Rakefile
  2. +3 −3 lib/nestive/layout_helper.rb
  3. +3 −3 spec/internal/app/controllers/nestive_controller.rb
View
2 Rakefile
@@ -6,7 +6,7 @@ require 'bundler'
Bundler::GemHelper.install_tasks
-task :default => :spec
+task default: :spec
desc 'Run specs'
RSpec::Core::RakeTask.new
View
6 lib/nestive/layout_helper.rb
@@ -64,7 +64,7 @@ module LayoutHelper
# ...
# <% end %>
#
- # @example Extending the `admin` layout in a view (you'll need to render the view with `:layout => nil`)
+ # @example Extending the `admin` layout in a view (you'll need to render the view with `layout: nil`)
#
# # app/controllers/admin/posts_controller.rb
# class Admin::PostsController < ApplicationController
@@ -73,7 +73,7 @@ module LayoutHelper
#
# # Or disable Rails' layout rendering per-controller
# def index
- # render :layout => nil
+ # render layout: nil
# end
# end
#
@@ -91,7 +91,7 @@ def extends(layout, &block)
# Capture the content to be placed inside the extended layout
@view_flow.get(:layout).replace capture(&block)
- render :file => layout
+ render file: layout
end
# Defines an area of content in your layout that can be modified or replaced by child layouts
View
6 spec/internal/app/controllers/nestive_controller.rb
@@ -1,13 +1,13 @@
class NestiveController < ApplicationController
def extended_one
- render :layout => 'extend_one'
+ render layout: 'extend_one'
end
def extended_two
- render :layout => 'extend_two'
+ render layout: 'extend_two'
end
def extended_three
- render :layout => 'extend_one'
+ render layout: 'extend_one'
end
end

0 comments on commit 514070e

Please sign in to comment.
Something went wrong with that request. Please try again.