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 trialMichael Mykytyn
23,440 PointsStage 3 Created an Image Gallery stage 3 of 3
Hi stuck on the last question for way too long. Its got to be something I'm not understanding about the question or overthinking. Could somebody give me a hand?
Thanks!
3 Answers
Eric Martz
16,007 PointsI think the wording is a little confusing on the question at first, but I guess this is how we have to think and talk if we're going to be developers. :-)
The custom hash is the one we created,
{ profile_name: params[:profile_name] }
now we just have to call the method we're overriding with
.merge(super)
Hope this helps.
Michael Mykytyn
23,440 PointsThanks Eric. just needed to add the .merge(super)
I'm not looking to think and talk like a developer. Just needed to get this one done so I can move forward and get some work done.
I hope you can appreciate that.
(Edited my original response to that bait).
james white
78,399 PointsAdd it where?
I found this thread:
https://teamtreehouse.com/forum/def-urloptions
..which indicated it should go before the first end statement:
class AlbumsController < ApplicationController
attr_accessor :url_options_called
def index
@albums = @user.albums.all
end
# Write your code here
def url_options
{ profile_name: current_user.profile_name }
.merge(super)
end
end
Note: Like Michael, I also "just needed to get this one done so I can move forward.."