I'm not sure if this is actually a Semantic-UI problem, or more of a conflict with the app, but I'm just putting it out there in case anybody has encountered this before and had a solution. I tried googling but no use... Hopefully somebody can help shed some light on this matter, or direct me to the right direction.
We are in the process of upgrading our app to Rails 5 from Rails 4, and form validations worked really well in Rails 4. Once we have upgraded to Rails 5, it seems like form validations no longer works, and I kinda identify what happened.
On Rails 4, when I run $.fn.form and $.fn.form.settings on the web console, the definitions are clearly written out, and it matches the definition in the auto-generated js file. However, on Rails 5,
$.fn.form gives a weird looking definition and $.fn.form.settings is undefined.
My guess is that for some reason the new version of Rails changes how it includes js files, and for some reason it misses the auto-generated file? It's also kinda odd that the file is stored in the assets/images folder.
I'd be more than happy to provide more information, and very sorry if my question is irrelevant to Semantic-UI. Been a big fan of you guys so far!
@imrimt, since this is not something related to Semantic-UI, I am closing it.
I'm sure devs who have similar problems might stumble upon this issue but there's no exact answer.
Since issue is related to Rails and not SUI itself, closing this :)
So I seem to have fixed that problem, but just updating on what happened. Apparently for some reason, this line is not working in semantic_ui.js:
//= require semantic_ui/definitions/behaviors/form.js
So I just create a seperate js file that copies that code for that definition. What is weird is that it only happens to form (as far as we can tell), other things like search or tab still work (and get loaded) normally.
Most helpful comment
So I seem to have fixed that problem, but just updating on what happened. Apparently for some reason, this line is not working in
semantic_ui.js://= require semantic_ui/definitions/behaviors/form.jsSo I just create a seperate
jsfile that copies that code for that definition. What is weird is that it only happens toform(as far as we can tell), other things likesearchortabstill work (and get loaded) normally.