-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add to_str method #13
Comments
Hello @mintuhouse, I check the code of safe_join helper: def safe_join(array, sep=$,)
sep = ERB::Util.unwrapped_html_escape(sep)
array.flatten.map! { |i| ERB::Util.unwrapped_html_escape(i) }.join(sep).html_safe
end In Rails 4.2, ERB::Util.unwrapped_html_escape doesn't call to In Rails master ERB::Util.unwrapped_html_escape method is different, but I can't find any reference to Where do you see |
Hi @Angelmmiguel I feel its still a good thing to have as |
No problem :). What version of Ruby are you using @mintuhouse? |
2.1.8 |
Okey. I find this interesting article about the difference between I will add this functionality for the next release of Material Icons gem. While next version is released, you can use |
ok. Thanks @Angelmmiguel |
@mintuhouse I investigate the problem and it comes from the way to declare the icon name. I use a custom # Undefined method will ref to the icon.
def method_missing(name)
@icon = clear_icon(name)
self
end
|
I think I will migrate this behaviour to an |
But wouldn't that be a backward incompatible change (assuming we won't maintain complete list of allowed icons - in say .yml file)? |
Yes, the problem is that change breaks compatibility with older versions. That's the reason I haven't changed it yet :) |
alias_method :to_str, :to_s
in MaterialIcon ClassRails safe_join calls to_str on objects passed before they are concatenated
The text was updated successfully, but these errors were encountered: