Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

stylesheet_link_tag should overwrite 'media', not :media #1

Open
MartinKoerner opened this issue Feb 16, 2010 · 1 comment
Open

stylesheet_link_tag should overwrite 'media', not :media #1

MartinKoerner opened this issue Feb 16, 2010 · 1 comment

Comments

@MartinKoerner
Copy link

options = sources.extract_options!.stringify_keys
options[:media] = 'print' if options[:media].blank?

In the first line, every key is converted to a string, in the second line you look for the :media key
Maybe

options["media"] ||= 'print'

is better?

@igorbozato
Copy link

Can options[:media] be a empty string? The actually code cover this, your example not.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants