Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Commit

Permalink
Deletion on Nested Attributes fixed for Projects and Education fields
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrrazan committed Jan 3, 2019
1 parent 59f3659 commit cbf7e91
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -97,7 +97,6 @@ gem 'momentjs-rails', '~> 2.9', :github => 'derekprior/momentjs-rails'
gem "font-awesome-rails"
gem 'font-awesome-sass', '~> 5.0.6'
gem 'bootstrap-datepicker-rails'
gem 'honeybadger', '~> 4.0'

#Gitlab gem
gem 'execjs'
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# Welcome to make-your-CV app!

[![Build Status](https://travis-ci.org/cdrrazan/make-your-cv.svg?branch=master)](https://travis-ci.org/cdrrazan/make-your-cv) [![Lice1Millionnse: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![Build Status](https://travis-ci.com/cdrrazan/make-your-cv.svg?branch=master)](https://travis-ci.com/cdrrazan/make-your-cv) [![Lice1Millionnse: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

### make-your-cv : Get info from user and store/generate PDF!

Expand Down
2 changes: 1 addition & 1 deletion app/models/cvm.rb
Expand Up @@ -6,7 +6,7 @@ class Cvm < ApplicationRecord

has_many :experiences, :inverse_of => :cvm, dependent: :destroy

accepts_nested_attributes_for :educations, :experiences
accepts_nested_attributes_for :educations, :experiences, allow_destroy: true

validates :fname, :lname, :street, :district,:country, :land,
:mobile, :email, :website, :skill, :interest,
Expand Down
2 changes: 1 addition & 1 deletion app/models/experience.rb
Expand Up @@ -6,7 +6,7 @@ class Experience < ApplicationRecord

has_many :projects, dependent: :destroy

accepts_nested_attributes_for :projects
accepts_nested_attributes_for :projects, allow_destroy: true


end

0 comments on commit cbf7e91

Please sign in to comment.