Act_as_list, each event has his own postion list

Hi,
This is my project -> https://github.com/regedarek/ekorezerwacja
This is my page -> http://ekorozwoj.heroku.com/events/1

I use act_as_list
class User < ActiveRecord::Base
has_many :seats
has_many :events, :through => :seats
end
class Event < ActiveRecord::Base
has_many :seats
has_many :users, :through => :seats
end
class Seat < ActiveRecord::Base
belongs_to :user
belongs_to :event
end

I have problem with single :position column for all events.
How to sort my users in each own event.
Please help.

On Mar 23, 4:47pm, “Darek F.” [email protected] wrote:

I have problem with single :position column for all events.
How to sort my users in each own event.
Please help.

Are you looking for acts_as_list’s :scope option?

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs