Skip to content

Commit

Permalink
Updated comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMT committed Jul 2, 2020
1 parent e1031a5 commit 1af3e77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fragmentary/fragment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def needs?(attribute_name)
# create or retrieve a Fragment of that class. A user_id is needed for example when caching user-specific content
# such as a user profile. When the fragment is instantiated using FragmentsHelper methods 'cache_fragment' or
# 'CacheBuilder.cache_child', a :user option is added to the options hash automatically from the value of 'current_user'.
# The user_id is extracted from this option in Fragment.find_or_create.
# The user_id is extracted from this option in Fragment.attributes.
def needs_user_id
self.extend NeedsUserId
end
Expand All @@ -156,7 +156,7 @@ def needs_user_id
# differently depending on the type of user, e.g. to distinguish between content seen by signed in users and those not
# signed in. When the fragment is instantiated using FragmentsHelper methods 'cache_fragment' or 'CacheBuilder.cache_child',
# a :user option is added to the options hash automatically from the value of 'current_user'. The user_type is extracted
# from this option in Fragment.find_or_create.
# from this option in Fragment.attributes.
def needs_user_type(options = {})
self.extend NeedsUserType
instance_eval do
Expand Down

0 comments on commit 1af3e77

Please sign in to comment.