search for: remove_field

Displaying 2 results from an estimated 2 matches for "remove_field".

Did you mean: remove_fields
2010 Apr 12
3
$(link).previous("input[type=hidden]") is undefined
I am getting this error when trying to use the remove link explained in the Railscast: http://railscasts.com/episodes/197-nested-model-form-part-2 error: $(link).previous("input[type=hidden]") is undefined remove_fields()applic...1065175 (line 6) function onclick(event) { remove_fields(this); return false; }()1 (line 2) [Break on this error] $(link).previous("input[type=hidden]").value = "1"; in the view file I have : <% echantillon_form.fields_for :treatments do |builder| %>...
2012 May 11
14
What is the point of using :format in routes?
...feeScript and one from Rails itself. I have something like this: routes.rb post ''/fields/:id.:format'' => ''fields#show'', as: :field, constraints: {id: /\d+/} post ''/fields/remove/:id'' => ''fields#remove'', as: :remove_field routes.js.coffee.erb: <% h = Rails.application.routes.url_helpers { fields: false, remove_field: true }.each do |named_route, expect_id| %> <% if expect_id %> window.<%= named_route %>_path = (id, format=''.json'')-> "<%= h.send :"#{named_...