Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Keep walking...
Browse files Browse the repository at this point in the history
  • Loading branch information
kdiogenes committed Feb 8, 2017
1 parent 76d4cf9 commit fb2edff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PATH
remote: ./vendor/gems/active_type
remote: vendor/gems/active_type
specs:
active_type (0.6.2)
activerecord (>= 3.2)
Expand Down Expand Up @@ -212,4 +212,4 @@ DEPENDENCIES
web-console

BUNDLED WITH
1.13.6
1.14.3
1 change: 1 addition & 0 deletions app/controllers/nested_form_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def build_nested_form(ignore_params = false)
category.listener_deadline_values.build if category.listener_deadline_values.empty?
# category.presenter_deadline_values.build if category.presenter_deadline_values.empty?
end
@nested_form.listener_deadlines.each(&:validate)
@nested_form.validate if request.method == 'POST'
@nested_form
end
Expand Down
4 changes: 2 additions & 2 deletions app/views/nested_form/good.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
%th.deadline{ 'v-for': "deadline in listener_deadlines", ':class': '{ hide: deadline._destroy }',
style: 'min-width: 155px' }
= f_deadline.input_field :_destroy, as: :hidden, 'v-model': 'deadline._destroy'
= f_deadline.input :deadline, wrapper: 'compact_input_group', input_group_html: { data: { flatpickr: true, wrap: true, alt_format: 'd/m/Y', enable_time: false } } do
= f_deadline.input :deadline, wrapper: 'compact_input_group', input_group_html: { data: { flatpickr: true, wrap: true, alt_format: 'd/m/Y', enable_time: false } }, error_html: {} do
%span.input-group-btn{ data: { toggle: true } }
%button.btn.btn-default.btn-sm{ type: 'button' }= fa_icon 'calendar'
= f_deadline.input_field :deadline, 'v-model': 'deadline.deadline', class: 'form-control input-sm', data: { input: true }
%span.input-group-btn= link_to fa_icon('calendar-times-o'), 'javascript:void(0)',
'@click': 'destroy(deadline)', class: 'btn btn-danger btn-sm'
= f_deadline.error :deadline
%th= link_to fa_icon('calendar-plus-o'), 'javascript:void(0)', '@click': 'addDeadline',
class: 'btn btn-primary btn-sm'
%tbody
Expand Down Expand Up @@ -120,5 +119,6 @@
listener_deadlines: listener_deadlines
presenter_deadlines: presenter_deadlines
methods: listenerMethods
mounted: -> updateTable(@$el)
updated: -> updateTable(@$el)

0 comments on commit fb2edff

Please sign in to comment.