javascript - Executing a jQuery script when rendering -


i'd execute jquery script while rendering action in rails controller.

to more precise, have function in users controller ...

def create     @user = user.new(user_params)     if @user.save       # successful save     else       render action: "new", layout: "signup"     end end 

... , want add class specific element in new.html.erb file. need when rendering because don't want class added beforehand.

how can that?


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -