-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
Create element in default position #103
Comments
Do you think make sense to create a new method to force the top position? |
|
Actually no, what I said is not right. |
Can you try task = Task.build(name: 'I want to be at the top')
task.insert_at(0) |
I am having this same issue.
I'm trying to add slightly more complicated logic for default list positions:
I have the first 2 under control; the 3rd one is causing me the same problem csaura is having. I've tried effecting the behavior through before_create callbacks, after_create callbacks, and by modifying the model's :create! method. None of these has had any impact whatsoever. I also tried what you suggested in your last post, and that didn't change anything either. |
Joining in late, but this sounds like two different scopes to me.
or something like that. Still that wouldn't allow for the complex logic about where in the list an item in the I'll close this for now since it's had no action for a while, but I'm happy to discuss it further if you want. |
When I try create a new element in the default position create it at the bottom of the list.
Example:
How can I create a new element forcing the default position?
The text was updated successfully, but these errors were encountered: