Fix rails error when using custom button classes

Fix for this issue https://github.com/zurb/foundation/issues/4871