diff options
author | Matthew Draper <matthew@trebex.net> | 2015-08-12 14:24:41 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2015-08-12 14:24:41 +0930 |
commit | 9dbccf02c5ab5dcda2ff11eb9f840a5964dc9637 (patch) | |
tree | 5a309cffeaf55839987b877d5290f88f953b0553 /activerecord/lib/active_record/attribute_methods.rb | |
parent | aea7e93ba45ac660f3cadbfca5822e207ce880e8 (diff) | |
parent | ddbd6e7e44e5183ae64ca8749dcf720e843d2355 (diff) | |
download | rails-9dbccf02c5ab5dcda2ff11eb9f840a5964dc9637.tar.gz rails-9dbccf02c5ab5dcda2ff11eb9f840a5964dc9637.tar.bz2 rails-9dbccf02c5ab5dcda2ff11eb9f840a5964dc9637.zip |
Merge pull request #21205 from akihiro17/fix-doc
[ci skip] Fix the indentation
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 26 |
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 |