app/controllers/searches_controller.rb in artfully_ose-1.2.0.pre.19 vs app/controllers/searches_controller.rb in artfully_ose-1.2.0.pre.20

- old
+ new

@@ -4,11 +4,11 @@ before_filter :load_tags, :only => [:new, :show] def new authorize! :view, Search @search = Search.new(params[:search]) - @membership_types = MembershipType.all + @membership_types = current_user.current_organization.membership_types.all prepare_search_and_people end def create authorize! :create, Search @@ -20,10 +20,10 @@ def show @search = Search.find(params[:id]) authorize! :view, @search @segment = Segment.new - @membership_types = MembershipType.all + @membership_types = current_user.current_organization.membership_types.all session[:return_to] ||= request.referer # Record the current page, in case creating a list segment fails. prepare_search_and_people respond_to do |format| format.html { @people = @people.paginate(:page => params[:page], :per_page => 20) } format.csv { render :csv => Person.where(:id => @people.collect(&:id)).includes(:phones, :address, :tags).order('lower(people.last_name)'), :filename => "#{@search.id}-#{DateTime.now.strftime("%m-%d-%y")}" }