From 1af3e77b602f9e746ec919e77566f35bd3b97c0f Mon Sep 17 00:00:00 2001 From: Mark Thomson Date: Thu, 2 Jul 2020 16:20:03 +1200 Subject: [PATCH] Updated comment. --- lib/fragmentary/fragment.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fragmentary/fragment.rb b/lib/fragmentary/fragment.rb index 2193ea7..3c10843 100644 --- a/lib/fragmentary/fragment.rb +++ b/lib/fragmentary/fragment.rb @@ -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 @@ -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