Sha256: c6eaa7feede133fc9ad072d5a548ae6022293dff860db33cf1792b3e16e2b637

Contents?: true

Size: 422 Bytes

Versions: 9

Compression:

Stored size: 422 Bytes

Contents

<%= form_for @record do |f| %>
    <%= f.text_field :field2, data: {autonumeric: {aSign: 'USD ', mDec: 1}} %>
    <%= f.submit 'Go' %>
<% end %>

<script>
    jQuery(function() {
        var new_field = '<input id="record_field1" name="record[field1]" data-autonumeric="true" value="<%= @record.field1.to_s %>">';
        $('form').prepend(new_field);

        $(document).trigger('refresh_autonumeric');
    });
</script>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
autonumeric-rails-2.0.0.1 spec/dummy/app/views/forms/javascript_fields.html.erb
autonumeric-rails-2.0 spec/dummy/app/views/forms/javascript_fields.html.erb
autonumeric-rails-1.9.46.2 spec/dummy/app/views/forms/javascript_fields.html.erb
autonumeric-rails-1.9.46 spec/dummy/app/views/forms/javascript_fields.html.erb
autonumeric-rails-1.9.43 spec/dummy/app/views/forms/javascript_fields.html.erb
autonumeric-rails-1.9.42 spec/dummy/app/views/forms/javascript_fields.html.erb
autonumeric-rails-1.9.39 spec/dummy/app/views/forms/javascript_fields.html.erb
autonumeric-rails-1.9.37 spec/dummy/app/views/forms/javascript_fields.html.erb
autonumeric-rails-1.9.33 spec/dummy/app/views/forms/javascript_fields.html.erb