Sha256: 74e9db23aa5cf880d125c27c3551a69f024ae53880d59531abc4beefa34f3419
Contents?: true
Size: 760 Bytes
Versions: 7
Compression:
Stored size: 760 Bytes
Contents
class MembershipsController < ArtfullyOseController before_filter :load_tags, :only => [:index] def index @person = Person.find(params[:person_id]) @membership_types = current_organization.membership_types end def bulk_update @person = Person.find(params[:person_id]) extend_memberships(params) redirect_to person_memberships_path(@person) end private def extend_memberships(params) #I hate how these are tied to the button text if params[:commit].eql? "Change Expiration" params[:membership_ids].each do |membership_id| Membership.find(membership_id).adjust_expiration_to(params[:ends_at]) end flash[:notice] = "Memberships have been adjusted." end end end
Version data entries
7 entries across 7 versions & 1 rubygems