Currently image_tag throws an error generating the alt attribute for
images whose basename contains only periods.
Suggest simply casting possible nil to_s.
- options[:alt] ||= File.basename(options[:src],
'.*').split('.').first.capitalize
+ options[:alt] ||= File.basename(options[:src],
'.*').split('.').first.to_s.capitalize
Addressed in ticket 9018, patch at
http://dev.rubyonrails.org/attachment/ticket/9018/9018_image_tag_alt_attribute_for_files_whose_basename_contains_only_periods.diff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---