mkhairi / materialize-sass

Materializecss rubygem for Rails Asset Pipeline / Sprockets
http://materialize.labs.my/
MIT License
806 stars 243 forks source link

Forms are broken in 1.0.0.rc2 #179

Closed TheRPunkt closed 5 years ago

TheRPunkt commented 6 years ago

Hello! I updated the gem today to the newest version (which should be 1.0.0.rc2). Unfortunately I guess that the javascript that handles the label's active class does not work how it should.

This is my view code:

= form_for @application, url: applications_path do |f|
    .input-field
        = f.text_field :name
        = f.label :name

(shortened)

This is how it looks for me: form_error

As I can see the file size of the forms.js file has been decreased dramatically, maybe it has something to do with this (not sure though).

mkhairi commented 6 years ago

@TheRPunkt it should be ok as the demo site currently using 1.0.0.rc2 too.

TheRPunkt commented 6 years ago

@mkhairi Thanks for your quick reply. I did some research about my project and created a new plain rails project with only the materialize gem installed. With this done it actually worked. Afterwards I found out that I did one thing different: In the test project I followed the installation instruction to require materialize while in my main project I required materialize-sprockets. After changing that it actually worked. However, I do not think that this is an intended behaviour, is it?

mkhairi commented 5 years ago

released 1.0.0