I am using acts_as_list on my model.I have a position column on that model for which I don't wan't the model object to be saved to the database if the position is more than my upper-limit.(I tried using rails validation for position, but apparently it seems that rails validation runs first then acts_as_list does it's job to update(increment) the position and save it in db.
Is something like this possible with acts_as_list scope: :widgets, {0 < :position <= 2}
I went through their documentation, but couldn't find anything.
How can I do it in Rails.
Any help will be much appreciated. please feel free to ask me for more info if you need.
I think you need to do something like this