Improving the URL Shortener Design Discussion
Discussion for
Improving the URL Shortener Design
Hello Chris and ROR developers, Why I need to add **kwargs and what is doing ??
def favicon_image_tag(domain, **kwargs)
image_tag google_favicon_url(domain), **kwargs
end
Hey Diego, the **kwargs parameter is added to the method signature so that you can pass a hash of options to the favicon_image_tag method which will then be forwarded along to the image_tag method. This allows you to be able to pass different options (kwargs) wherever you call the favicon_image_tag method to customize attributes of the image_tag method. Hope that helps!