GithubHelp home page GithubHelp logo

bug in add_to_list_bottom about acts-as-list HOT 2 CLOSED

ryanb avatar ryanb commented on June 8, 2024
bug in add_to_list_bottom

from acts-as-list.

Comments (2)

nono avatar nono commented on June 8, 2024

Hi,

can you explain what is not working? It throws an exception? The position is not set?

from acts-as-list.

PsychoPhobic avatar PsychoPhobic commented on June 8, 2024

i did't see the error before because its at ajax request
but now i edited the controler and see the reason is add_to_list_bottom is private (i didn't see that before)

but i didn't see any other public function is give this funktionality

posibility 1

maybe you can edit add_to_list_top and add_to_list_bottom for public use
and raise an error if object is already in list OR refer to functions move_to_top and move_to_bottom in this case

posibility2
dont edit add_to_list_top and add_to_list_bottom
and add to insert_at(position = 1) :top and :bottom as posible parameters (or maybe -1 for last like in Array)

posibility3
i don't know if its possible but maybe you can also add a function which can include all the 4 functions in my transaction by set a new parameter for :scope
if its defined like acts_as_list :scope => 'section = '#{section}''

regards

Stefan

from acts-as-list.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.