Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested Elements Touching Parent #1389

Closed
oniram88 opened this issue Mar 9, 2018 · 5 comments
Closed

Nested Elements Touching Parent #1389

oniram88 opened this issue Mar 9, 2018 · 5 comments

Comments

@oniram88
Copy link
Contributor

oniram88 commented Mar 9, 2018

I'm searching to reproduce an error but I can't figure it out.... i tested the same thing inside the dummy app and it's working fine:

I have an element with nested elements, and when the child element is changed the parent didn't receive the touch, i tested it in the console with: Alchemy::Element.find(8).touch (where 8 is the id of my nested element) and the parent node is will not update his updated_at:

Alchemy::Element.find(8).touch
   (0.5ms)  SET NAMES utf8,  @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'),  @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
  Alchemy::Element Load (0.6ms)  SELECT  `alchemy_elements`.* FROM `alchemy_elements` WHERE `alchemy_elements`.`id` = 8 LIMIT 1
   (0.3ms)  BEGIN
  Alchemy::Page Load (0.5ms)  SELECT  `alchemy_pages`.* FROM `alchemy_pages` WHERE `alchemy_pages`.`id` = 2 LIMIT 1
  SQL (0.4ms)  UPDATE `alchemy_elements` SET `updated_at` = '2018-03-09 15:13:43' WHERE `alchemy_elements`.`id` = 8
  Alchemy::Element Load (0.4ms)  SELECT  `alchemy_elements`.* FROM `alchemy_elements` WHERE `alchemy_elements`.`id` = 6 LIMIT 1
  SQL (0.7ms)  UPDATE `alchemy_pages` INNER JOIN `alchemy_elements_alchemy_pages` ON `alchemy_pages`.`id` = `alchemy_elements_alchemy_pages`.`page_id` SET `alchemy_pages`.`updated_at` = '2018-03-09 15:13:43', `alchemy_pages`.`updater_id` = NULL WHERE `alchemy_elements_alchemy_pages`.`element_id` = 8
  Gutentag::Tag Load (0.5ms)  SELECT `gutentag_tags`.* FROM `gutentag_tags` INNER JOIN `gutentag_taggings` ON `gutentag_tags`.`id` = `gutentag_taggings`.`tag_id` WHERE `gutentag_taggings`.`taggable_id` = 8 AND `gutentag_taggings`.`taggable_type` = 'Alchemy::Element'
  Alchemy::Page Load (0.4ms)  SELECT  `alchemy_pages`.* FROM `alchemy_pages` WHERE `alchemy_pages`.`id` = 2 LIMIT 1
  SQL (0.5ms)  UPDATE `alchemy_pages` INNER JOIN `alchemy_elements_alchemy_pages` ON `alchemy_pages`.`id` = `alchemy_elements_alchemy_pages`.`page_id` SET `alchemy_pages`.`updated_at` = '2018-03-09 15:13:43', `alchemy_pages`.`updater_id` = NULL WHERE `alchemy_elements_alchemy_pages`.`element_id` = 6
  Gutentag::Tag Load (0.3ms)  SELECT `gutentag_tags`.* FROM `gutentag_tags` INNER JOIN `gutentag_taggings` ON `gutentag_tags`.`id` = `gutentag_taggings`.`tag_id` WHERE `gutentag_taggings`.`taggable_id` = 6 AND `gutentag_taggings`.`taggable_type` = 'Alchemy::Element'
   (1.9ms)  COMMIT

If I change the Alchemy::Touching touch method so:

module Alchemy
  module Touching
    # Touches the timestamps and userstamps
    #
    def touch(*)
      self.reload
      # Using update here, because we want the touch call to bubble up to the page.
      update(touchable_attributes)
    end
...

all will work correctly


2.3.3 :001 > Alchemy::Element.find(8).touch
   (0.5ms)  SET NAMES utf8,  @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'),  @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
  Alchemy::Element Load (0.6ms)  SELECT  `alchemy_elements`.* FROM `alchemy_elements` WHERE `alchemy_elements`.`id` = 8 LIMIT 1
  Alchemy::Element Load (0.5ms)  SELECT  `alchemy_elements`.* FROM `alchemy_elements` WHERE `alchemy_elements`.`id` = 8 LIMIT 1
   (0.3ms)  BEGIN
  Alchemy::Page Load (0.6ms)  SELECT  `alchemy_pages`.* FROM `alchemy_pages` WHERE `alchemy_pages`.`id` = 2 LIMIT 1
  SQL (0.4ms)  UPDATE `alchemy_elements` SET `updated_at` = '2018-03-09 15:18:14' WHERE `alchemy_elements`.`id` = 8
  Alchemy::Element Load (0.3ms)  SELECT  `alchemy_elements`.* FROM `alchemy_elements` WHERE `alchemy_elements`.`id` = 6 LIMIT 1
  SQL (0.8ms)  UPDATE `alchemy_pages` INNER JOIN `alchemy_elements_alchemy_pages` ON `alchemy_pages`.`id` = `alchemy_elements_alchemy_pages`.`page_id` SET `alchemy_pages`.`updated_at` = '2018-03-09 15:18:15', `alchemy_pages`.`updater_id` = NULL WHERE `alchemy_elements_alchemy_pages`.`element_id` = 8
  Gutentag::Tag Load (0.3ms)  SELECT `gutentag_tags`.* FROM `gutentag_tags` INNER JOIN `gutentag_taggings` ON `gutentag_tags`.`id` = `gutentag_taggings`.`tag_id` WHERE `gutentag_taggings`.`taggable_id` = 8 AND `gutentag_taggings`.`taggable_type` = 'Alchemy::Element'
  Alchemy::Element Load (0.3ms)  SELECT  `alchemy_elements`.* FROM `alchemy_elements` WHERE `alchemy_elements`.`id` = 6 LIMIT 1
  Alchemy::Page Load (0.3ms)  SELECT  `alchemy_pages`.* FROM `alchemy_pages` WHERE `alchemy_pages`.`id` = 2 LIMIT 1


  SQL (0.3ms)  UPDATE `alchemy_elements` SET `updated_at` = '2018-03-09 15:18:15' WHERE `alchemy_elements`.`id` = 6


  SQL (0.4ms)  UPDATE `alchemy_pages` INNER JOIN `alchemy_elements_alchemy_pages` ON `alchemy_pages`.`id` = `alchemy_elements_alchemy_pages`.`page_id` SET `alchemy_pages`.`updated_at` = '2018-03-09 15:18:15', `alchemy_pages`.`updater_id` = NULL WHERE `alchemy_elements_alchemy_pages`.`element_id` = 6
  Gutentag::Tag Load (0.3ms)  SELECT `gutentag_tags`.* FROM `gutentag_tags` INNER JOIN `gutentag_taggings` ON `gutentag_tags`.`id` = `gutentag_taggings`.`tag_id` WHERE `gutentag_taggings`.`taggable_id` = 6 AND `gutentag_taggings`.`taggable_type` = 'Alchemy::Element'
   (2.1ms)  COMMIT

All the elements are standard alchemy elements with alchemy essence:

- name: servizio_offerto
  hint: 'Visualizza un blocco con logo,testo e titolo; utilizzato dentro al contenitore servizi'
  contents:
    - name: title
      type: EssenceText
      hint: Titolo
    - name: logo
      type: EssencePicture
    - name: desc
      type: EssenceRichtext
    - name: link
      type: EssenceLink

- name: contenitore_servizi
  hint: "Visualizza un titolo e l'elenco dei servizi"
  contents:
    - name: title
      type: EssenceText
      hint: Titolo
  nestable_elements:
  - servizio_offerto

This is my Gemfile.lock

GIT
  remote: https://github.com/AlchemyCMS/alchemy-devise.git
  revision: 7931ae2ba65629b6e6ba462970f67b0ed59c1fab
  branch: master
  specs:
    alchemy-devise (4.1.0.beta)
      alchemy_cms (>= 4.0.0.beta, < 4.99)
      devise (>= 4.0, < 4.99)

PATH
  remote: ../alchemy_cms
  specs:
    alchemy_cms (4.1.0.beta)
      active_model_serializers (~> 0.9.0)
      acts_as_list (~> 0.3)
      awesome_nested_set (~> 3.1)
      cancancan (~> 2.1)
      coffee-rails (~> 4.0)
      dragonfly (~> 1.0, >= 1.0.7)
      dragonfly_svg (~> 0.0.4)
      gutentag (~> 2.2, >= 2.2.1)
      handlebars_assets (~> 0.23)
      jquery-rails (~> 4.0, >= 4.0.4)
      jquery-ui-rails (~> 5.0.0)
      kaminari (~> 1.1)
      non-stupid-digest-assets (~> 1.0.8)
      originator (~> 3.1)
      rails (~> 5.0, < 6.0)
      ransack (~> 1.4)
      request_store (~> 1.2)
      responders (~> 2.0)
      select2-rails (>= 3.5.9.1, < 4.0)
      simple_form (= 3.5.1)
      turbolinks (>= 2.5)

GEM
  remote: https://rubygems.org/
  remote: https://rails-assets.org/
  specs:
    actioncable (5.1.5)
      actionpack (= 5.1.5)
      nio4r (~> 2.0)
      websocket-driver (~> 0.6.1)
    actionmailer (5.1.5)
      actionpack (= 5.1.5)
      actionview (= 5.1.5)
      activejob (= 5.1.5)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.1.5)
      actionview (= 5.1.5)
      activesupport (= 5.1.5)
      rack (~> 2.0)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.1.5)
      activesupport (= 5.1.5)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    active_model_serializers (0.9.7)
      activemodel (>= 3.2)
      concurrent-ruby (~> 1.0)
    active_type (0.7.5)
      activerecord (>= 3.2)
    activejob (5.1.5)
      activesupport (= 5.1.5)
      globalid (>= 0.3.6)
    activemodel (5.1.5)
      activesupport (= 5.1.5)
    activerecord (5.1.5)
      activemodel (= 5.1.5)
      activesupport (= 5.1.5)
      arel (~> 8.0)
    activesupport (5.1.5)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    acts_as_list (0.9.10)
      activerecord (>= 3.0)
    addressable (2.5.2)
      public_suffix (>= 2.0.2, < 4.0)
    airbrake (5.8.1)
      airbrake-ruby (~> 1.8)
    airbrake-ruby (1.8.0)
    airbrussh (1.3.0)
      sshkit (>= 1.6.1, != 1.7.0)
    arel (8.0.0)
    autoprefixer-rails (8.1.0.1)
      execjs
    awesome_nested_set (3.1.4)
      activerecord (>= 4.0.0, < 5.3)
    bcrypt (3.1.11)
    bindex (0.5.0)
    bootstrap (4.0.0)
      autoprefixer-rails (>= 6.0.3)
      popper_js (>= 1.12.9, < 2)
      sass (>= 3.5.2)
    bourbon (4.3.4)
      sass (~> 3.4)
      thor (~> 0.19)
    builder (3.2.3)
    byebug (10.0.0)
    cancancan (2.1.3)
    capistrano (3.10.1)
      airbrussh (>= 1.0.0)
      i18n
      rake (>= 10.0.0)
      sshkit (>= 1.9.0)
    capistrano-bundler (1.3.0)
      capistrano (~> 3.1)
      sshkit (~> 1.2)
    capistrano-db-tasks (0.6)
      capistrano (>= 3.0.0)
    capistrano-git-with-submodules (2.0.3)
      capistrano (~> 3.7)
    capistrano-passenger (0.2.0)
      capistrano (~> 3.0)
    capistrano-rails (1.3.1)
      capistrano (~> 3.1)
      capistrano-bundler (~> 1.1)
    capistrano-rails-console (1.0.2)
      capistrano (>= 3.1.0, < 4.0.0)
    capistrano-rails-tail-log (0.1.0)
      capistrano (>= 3.0)
      capistrano-rails
    capistrano-rvm (0.1.2)
      capistrano (~> 3.0)
      sshkit (~> 1.2)
    capybara (2.18.0)
      addressable
      mini_mime (>= 0.1.3)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (>= 2.0, < 4.0)
    childprocess (0.8.0)
      ffi (~> 1.0, >= 1.0.11)
    coffee-rails (4.2.2)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.0.5)
    cookie_law (0.1.2)
    crass (1.0.3)
    devise (4.4.1)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0, < 5.2)
      responders
      warden (~> 1.2.3)
    domain_name (0.5.20170404)
      unf (>= 0.0.5, < 1.0.0)
    dragonfly (1.1.4)
      addressable (~> 2.3)
      multi_json (~> 1.0)
      rack (>= 1.3)
    dragonfly_svg (0.0.4)
      dragonfly (~> 1.0)
      nokogiri
    erubi (1.7.1)
    execjs (2.7.0)
    ffi (1.9.23)
    font-awesome-rails (4.7.0.3)
      railties (>= 3.2, < 5.2)
    globalid (0.4.1)
      activesupport (>= 4.2.0)
    gutentag (2.2.1)
      activerecord (>= 3.2.0)
    handlebars_assets (0.23.2)
      execjs (~> 2.0)
      sprockets (>= 2.0.0)
      tilt (>= 1.2)
    http-cookie (1.0.3)
      domain_name (~> 0.5)
    httparty (0.16.0)
      multi_xml (>= 0.5.2)
    i18n (0.9.5)
      concurrent-ruby (~> 1.0)
    i18n-debug (1.1.1)
      i18n (< 2)
    jbuilder (2.7.0)
      activesupport (>= 4.2.0)
      multi_json (>= 1.2)
    jquery-rails (4.3.1)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jquery-slick-rails (1.8.1)
      railties (>= 3.1)
    jquery-ui-rails (5.0.5)
      railties (>= 3.2.16)
    js-routes (1.4.3)
      railties (>= 3.2)
      sprockets-rails
    json (2.1.0)
    kaminari (1.1.1)
      activesupport (>= 4.1.0)
      kaminari-actionview (= 1.1.1)
      kaminari-activerecord (= 1.1.1)
      kaminari-core (= 1.1.1)
    kaminari-actionview (1.1.1)
      actionview
      kaminari-core (= 1.1.1)
    kaminari-activerecord (1.1.1)
      activerecord
      kaminari-core (= 1.1.1)
    kaminari-core (1.1.1)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    lodash-rails (4.17.5)
      railties (>= 3.1)
    loofah (2.2.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.0)
      mini_mime (>= 0.1.1)
    method_source (0.9.0)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    mini_mime (1.0.0)
    mini_portile2 (2.3.0)
    minitest (5.11.3)
    multi_json (1.13.1)
    multi_xml (0.6.0)
    mysql2 (0.4.10)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-ssh (4.2.0)
    netrc (0.11.0)
    nio4r (2.2.0)
    nokogiri (1.8.2)
      mini_portile2 (~> 2.3.0)
    non-stupid-digest-assets (1.0.9)
      sprockets (>= 2.0)
    originator (3.1)
      actionpack (>= 4.0)
      activerecord (>= 4.0)
    orm_adapter (0.5.0)
    polyamorous (1.3.3)
      activerecord (>= 3.0)
    popper_js (1.12.9)
    public_suffix (3.0.2)
    puma (3.11.3)
    rack (2.0.4)
    rack-test (0.8.3)
      rack (>= 1.0, < 3)
    rails (5.1.5)
      actioncable (= 5.1.5)
      actionmailer (= 5.1.5)
      actionpack (= 5.1.5)
      actionview (= 5.1.5)
      activejob (= 5.1.5)
      activemodel (= 5.1.5)
      activerecord (= 5.1.5)
      activesupport (= 5.1.5)
      bundler (>= 1.3.0)
      railties (= 5.1.5)
      sprockets-rails (>= 2.0.0)
    rails-assets-OwlCarousel2 (2.2.1)
      rails-assets-jquery (>= 1.8.3)
    rails-assets-fancyBox (3.2.5)
      rails-assets-jquery (>= 1.9.0)
    rails-assets-jquery (3.3.1)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    rails_real_favicon (0.0.11)
      json (>= 1.7, < 3)
      rails (>= 3.1)
      rest-client (~> 2.0)
      rubyzip (~> 1)
    railties (5.1.5)
      actionpack (= 5.1.5)
      activesupport (= 5.1.5)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (12.3.0)
    ransack (1.8.7)
      actionpack (>= 3.0)
      activerecord (>= 3.0)
      activesupport (>= 3.0)
      i18n
      polyamorous (~> 1.3.2)
    rb-fsevent (0.10.3)
    rb-inotify (0.9.10)
      ffi (>= 0.5.0, < 2)
    recaptcha (4.6.6)
      json
    request_store (1.4.0)
      rack (>= 1.4)
    responders (2.4.0)
      actionpack (>= 4.2.0, < 5.3)
      railties (>= 4.2.0, < 5.3)
    rest-client (2.0.2)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    ruby_dep (1.5.0)
    rubyzip (1.2.1)
    sass (3.5.5)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sass-rails (5.0.7)
      railties (>= 4.0.0, < 6)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    select2-rails (3.5.10)
      thor (~> 0.14)
    selenium-webdriver (3.10.0)
      childprocess (~> 0.5)
      rubyzip (~> 1.2)
    simple_form (3.5.1)
      actionpack (> 4, < 5.2)
      activemodel (> 4, < 5.2)
    spring (2.0.2)
      activesupport (>= 4.2)
    sprockets (3.7.1)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sshkit (1.16.0)
      net-scp (>= 1.1.2)
      net-ssh (>= 2.8.0)
    thor (0.20.0)
    thread_safe (0.3.6)
    tilt (2.0.8)
    turbolinks (5.1.0)
      turbolinks-source (~> 5.1)
    turbolinks-source (5.1.0)
    tzinfo (1.2.5)
      thread_safe (~> 0.1)
    uglifier (4.1.6)
      execjs (>= 0.3.0, < 3)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.7.5)
    warden (1.2.7)
      rack (>= 1.0)
    web-console (3.5.1)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    websocket-driver (0.6.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.3)
    xpath (3.0.0)
      nokogiri (~> 1.8)

PLATFORMS
  ruby

DEPENDENCIES
  active_type
  airbrake (~> 5.0)
  alchemy-devise!
  alchemy_cms (~> 4.1.0.beta)!
  autoprefixer-rails
  bootstrap (~> 4.0.0.beta2.1)
  bourbon (~> 4.1)
  byebug
  capistrano
  capistrano-db-tasks
  capistrano-git-with-submodules (~> 2.0)
  capistrano-passenger
  capistrano-rails
  capistrano-rails-console (~> 1.0.0)
  capistrano-rails-tail-log
  capistrano-rvm
  capybara (~> 2.13)
  coffee-rails (~> 4.2)
  cookie_law
  font-awesome-rails
  httparty
  i18n-debug
  jbuilder (~> 2.5)
  jquery-rails
  jquery-slick-rails (~> 1.8, >= 1.8.1)
  jquery-ui-rails
  js-routes
  listen (>= 3.0.5, < 3.2)
  lodash-rails
  mysql2 (>= 0.3.18, < 0.5)
  puma (~> 3.7)
  rails (~> 5.1.4)
  rails-assets-OwlCarousel2
  rails-assets-fancyBox!
  rails_real_favicon
  recaptcha
  sass-rails (~> 5.0)
  selenium-webdriver
  spring
  turbolinks (~> 5)
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console (>= 3.3.0)

BUNDLED WITH
   1.16.1

Here the alchemy is linked to my local version of alchemy in sync with the current master, but I tested the same with the stable 4.0.0

I tested also to comment the Alchemy::Touching::touch method and making touch on the nested will update the parent element (obviously the other alchemy information will not update correctly):


 Alchemy::Element.find(8).touch
   (0.4ms)  SET NAMES utf8,  @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'),  @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
  Alchemy::Element Load (0.6ms)  SELECT  `alchemy_elements`.* FROM `alchemy_elements` WHERE `alchemy_elements`.`id` = 8 LIMIT 1
   (0.3ms)  BEGIN


  SQL (0.4ms)  UPDATE `alchemy_elements` SET `alchemy_elements`.`updated_at` = '2018-03-09 15:30:55' WHERE `alchemy_elements`.`id` = 8


  Alchemy::Element Load (0.5ms)  SELECT  `alchemy_elements`.* FROM `alchemy_elements` WHERE `alchemy_elements`.`id` = 6 LIMIT 1


  SQL (0.4ms)  UPDATE `alchemy_elements` SET `alchemy_elements`.`updated_at` = '2018-03-09 15:30:55' WHERE `alchemy_elements`.`id` = 6


   (2.2ms)  COMMIT

what can I test/look for???

@oniram88
Copy link
Contributor Author

oniram88 commented Mar 9, 2018

A possible solution would be to leave things as they would in the default of rails

module Alchemy
  module Touching
    # Touches the timestamps and userstamps
    #
    def touch(*)
      super
      # Using update here, because we want the touch call to bubble up to the page.
      update(touchable_attributes)
    end


.....

@tvdeyen
Copy link
Member

tvdeyen commented Mar 9, 2018

I agree that all our custom touching logic should be removed and we should let Rails handle that. Will work something out.

@tvdeyen
Copy link
Member

tvdeyen commented Mar 9, 2018

@oniram88 I created a PR #1390 that removes our custom touching mechanism and let Rails handle most of the associations.

Could you please test this in your app and check if this fixes your problem?

Just add my fork/branch to your Gemfile

# Gemfile

gem 'alchemy_cms', github: 'tvdeyen/alchemy_cms', branch: 'rails-touching'

and run bundle install.

@oniram88
Copy link
Contributor Author

Perfect, works great!

@tvdeyen
Copy link
Member

tvdeyen commented Mar 12, 2018

Thanks for the feedback. You can now switch back to

# Gemfile

gem 'alchemy_cms', github: 'AlchemyCMS/alchemy_cms', branch: 'master'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants