Call Ruby Function on Input (Simple Forms) -


i have field in simple form looks this

.row   - if f.object.avatar.present?     .field       = image_tag f.object.avatar.url   = f.input :avatar, label: f.object.avatar.present? ? 'replace avatar' : 'avatar' 

and ruby function want call when input changed (when image uploaded)

def update   # things end 

my understanding can use onchange: result want crash application when try. correct way this?


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -