Posts by Lucas Pereira Borges • 1 point
2 posts
-
0
votes2
answers514
viewsA: Nested Attributes with Rails
Try making the following change. @user = User.new.tap @user.build_inventory @user.inventory.inventory_items.build This other question helped me to clarify the use of build_ and .build. I recommend…
-
0
votes2
answers809
viewsA: Text field mask without using jquery
You can use htlm chews, with the Pattern parameter. Example: <%= ff.text_field :telefone_comercial, placeholder: '(DD)1234-5678', pattern: '\([0-9]{2}\)[0-9]{4,6}-?[0-9]{3,4}$' %> The mask is…