Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

undefined method `find' for nil:NilClass in route

if properties.ok?
              if @platform.budgets.enabled?
                setting = properties['accountUIProperties'].find { |setting| setting['propertyName'] == 'budgetsSetupSkippedDate' }

                @budgetsSetupSkippedDate = setting['propertyValue'] if setting
              end

              if @platform.onboarding.enabled? && properties['accountUIProperties'].find { |setting| setting['propertyName'] == 'coreOnboardingCompleteDate' }.nil?
                # Each of these keys must correspond to a key in enrollment.yml. That YAML is expected to
                # have a "continue" key and a "content" key with elements and text defined within.
                @onboarding = ['dashboard', 'control', 'transactions'].tap do |onboard|
                  onboard.push('budgets') if @platform.budgets.enabled?
                  onboard.push('goals') if @platform.goals.enabled?
                end
              end
            end

on the third line of my code I am attempting to loop through the account properties to set the 'budgetsSetupSkippedDate'. when using a pry and calling the 4th line in the console returns nil. Not sure where I am going wrong here.

Cheers!