aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods.rb
diff options
context:
space:
mode:
authorakihiro17 <coolwizard11@gmail.com>2015-08-12 11:33:02 +0900
committerakihiro17 <coolwizard11@gmail.com>2015-08-12 11:54:14 +0900
commitddbd6e7e44e5183ae64ca8749dcf720e843d2355 (patch)
tree252bf57fdc42fa916609c5bb6d114afad17aff62 /activerecord/lib/active_record/attribute_methods.rb
parent30608648efc227c3ae24bd8cfa62deb20e2c9648 (diff)
downloadrails-ddbd6e7e44e5183ae64ca8749dcf720e843d2355.tar.gz
rails-ddbd6e7e44e5183ae64ca8749dcf720e843d2355.tar.bz2
rails-ddbd6e7e44e5183ae64ca8749dcf720e843d2355.zip
[ci skip] Fix the indentation
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index 7fb899c242..0862306749 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -385,27 +385,27 @@ module ActiveRecord
#
# For example:
#
- # class PostsController < ActionController::Base
- # after_action :print_accessed_fields, only: :index
+ # class PostsController < ActionController::Base
+ # after_action :print_accessed_fields, only: :index
#
- # def index
- # @posts = Post.all
- # end
+ # def index
+ # @posts = Post.all
+ # end
#
- # private
+ # private
#
- # def print_accessed_fields
- # p @posts.first.accessed_fields
+ # def print_accessed_fields
+ # p @posts.first.accessed_fields
+ # end
# end
- # end
#
# Which allows you to quickly change your code to:
#
- # class PostsController < ActionController::Base
- # def index
- # @posts = Post.select(:id, :title, :author_id, :updated_at)
+ # class PostsController < ActionController::Base
+ # def index
+ # @posts = Post.select(:id, :title, :author_id, :updated_at)
+ # end
# end
- # end
def accessed_fields
@attributes.accessed
end