PageRenderTime 1710ms queryTime 42ms sortTime 0ms getByIdsTime 20ms findMatchingLines 9ms

100+ results results for 'ransack(params[:q])' (1710 ms)

Not the results you expected?
orders_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 137 lines
                    
54          authorize! :index, Order
                    
55          @orders = Order.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
56          respond_with(@orders)
                    
89          if current_api_user.persisted?
                    
90            @orders = current_api_user.orders.reverse_chronological.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
91          else
                    
                
users_controller.rb https://github.com/fig/spree.git | Ruby | 109 lines
                    
82        @collection = super
                    
83        @search = @collection.ransack(params[:q])
                    
84        @collection = @search.result.page(params[:page]).per(Spree::Config[:admin_users_per_page])
                    
                
enterprises_controller.rb https://gitlab.com/srihas/openfoodnetwork | Ruby | 261 lines
                    
150        elsif json_request?
                    
151          OpenFoodNetwork::Permissions.new(spree_current_user).editable_enterprises.ransack(params[:q]).result
                    
152        else
                    
155      when :for_line_items
                    
156        OpenFoodNetwork::Permissions.new(spree_current_user).visible_enterprises.ransack(params[:q]).result
                    
157      else
                    
                
taxons_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 95 lines
                    
11            else
                    
12              @taxons = Spree::Taxon.includes(:children).accessible_by(current_ability, :read).order(:taxonomy_id, :lft).ransack(params[:q]).result
                    
13            end
                    
67          taxon = Spree::Taxon.find(params[:id])
                    
68          @products = taxon.products.ransack(params[:q]).result
                    
69          @products = @products.page(params[:page]).per(params[:per_page] || 500)
                    
                
orders_controller.rb https://github.com/Aeon/spree.git | Ruby | 125 lines
                    
35
                    
36        @search = Order.ransack(params[:q])
                    
37        @orders = @search.result.includes([:user, :shipments, :payments]).page(params[:page]).per(Spree::Config[:orders_per_page])
                    
                
return_authorizations_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 71 lines
                    
24          @return_authorizations = order.return_authorizations.accessible_by(current_ability, :read).
                    
25                                   ransack(params[:q]).result.
                    
26                                   page(params[:page]).per(params[:per_page])
                    
                
products_controller.rb https://github.com/BDQ/spree.git | Ruby | 127 lines
                    
88
                    
89            @search = super.ransack(params[:q])
                    
90            @collection = @search.result.
                    
                
orders_controller.rb https://github.com/fabien/spree.git | Ruby | 127 lines
                    
37
                    
38        @search = Order.ransack(params[:q])
                    
39        @orders = @search.result(:distinct => true).includes([:user, :shipments, :payments]).page(params[:page]).per(Spree::Config[:orders_per_page])
                    
                
users_controller.rb git://github.com/fatfreecrm/fat_free_crm.git | Ruby | 153 lines
                    
138
                    
139    @search = klass.ransack(params[:q])
                    
140    @search.build_grouping unless @search.groupings.any?
                    
                
klasses_controller.rb https://gitlab.com/cd2/developingexperts | Ruby | 87 lines
                    
7    if signed_in_as_administrator?
                    
8      @q = @school.klasses.ransack(params[:q])
                    
9    else
                    
9    else
                    
10      @q = current_user.klasses.ransack(params[:q])
                    
11    end
                    
                
users_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 145 lines
                    
102          else
                    
103            @search = @collection.ransack(params[:q])
                    
104            @collection = @search.result.page(params[:page]).per(Spree::Config[:admin_products_per_page])
                    
                
orders_controller.rb https://github.com/jsqu99/spree.git | Ruby | 131 lines
                    
35
                    
36        @search = Order.accessible_by(current_ability, :index).ransack(params[:q])
                    
37
                    
                
teachers_controller.rb https://gitlab.com/cd2/developingexperts | Ruby | 71 lines
                    
8  def index
                    
9    @q = @school.faculty_members.ransack(params[:q])
                    
10    @teachers = @q.result(distinct: true)
                    
                
search_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 50 lines
                    
30        else
                    
31          @products = Product.ransack(params[:q]).result
                    
32        end
                    
43          else
                    
44            Tag.ransack(params[:q]).result
                    
45          end
                    
                
application_controller.rb https://gitlab.com/cd2/cms | Ruby | 113 lines
                    
34      if @resource_driver.respond_to? :ordered
                    
35        @q = @resource_driver.try(:ordered).ransack(params[:q])
                    
36      else
                    
36      else
                    
37        @q = @resource_driver.ransack(params[:q])
                    
38      end
                    
                
products_controller.rb https://github.com/GeekOnCoffee/spree.git | Ruby | 144 lines
                    
106        # @search needs to be defined as this is passed to search_form_for
                    
107        @search = @collection.ransack(params[:q])
                    
108        @collection = @search.result.
                    
                
orders_controller_decorator.rb https://gitlab.com/srihas/openfoodnetwork | Ruby | 128 lines
                    
98    if json_request?
                    
99      @search = OpenFoodNetwork::Permissions.new(spree_current_user).editable_orders.ransack(params[:q])
                    
100      @search.result.reorder('id ASC')
                    
101    else
                    
102      @search = Spree::Order.accessible_by(current_ability, :index).ransack(params[:q])
                    
103
                    
                
reports_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 65 lines
                    
42
                    
43        @search = Order.complete.ransack(params[:q])
                    
44        @orders = @search.result
                    
                
stock_items_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 77 lines
                    
7        def index
                    
8          @stock_items = scope.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
9          respond_with(@stock_items)
                    
                
option_values_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 63 lines
                    
8          else
                    
9            @option_values = scope.ransack(params[:q]).result.distinct
                    
10          end
                    
                
schedules_controller.rb https://gitlab.com/mdrz_92/prestasala | Ruby | 101 lines
                    
9    @count_schedules = Schedule.count 
                    
10    @q = Schedule.ransack(params[:q])
                    
11    @events = @q.result(distinct: true)
                    
                
pupils_controller.rb https://gitlab.com/cd2/developingexperts | Ruby | 104 lines
                    
12    pupil_driver = signed_in_as_administrator? ? @school : current_user
                    
13    @q = pupil_driver.pupils.ransack(params[:q])
                    
14    @pupils = @q.result(distinct: true)
                    
                
orders_controller.rb https://github.com/tomz/spree.git | Ruby | 137 lines
                    
41        authorize! :index, Order
                    
42        @orders = Order.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
43        respond_with(@orders)
                    
69        if current_api_user.persisted?
                    
70          @orders = current_api_user.orders.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
71        else
                    
                
promotions_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 38 lines
                    
23          @collection = super
                    
24          @search = @collection.ransack(params[:q])
                    
25          @collection = @search.result(distinct: true).
                    
                
product_properties_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 73 lines
                    
9          @product_properties = @product.product_properties.accessible_by(current_ability, :read).
                    
10                                ransack(params[:q]).result.
                    
11                                page(params[:page]).per(params[:per_page])
                    
                
users_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 60 lines
                    
8        def index
                    
9          @users = Spree.user_class.accessible_by(current_ability,:read).ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
10          respond_with(@users)
                    
                
return_authorizations_controller.rb https://github.com/tomz/spree.git | Ruby | 78 lines
                    
23        @return_authorizations = order.return_authorizations.accessible_by(current_ability, :read).
                    
24                                 ransack(params[:q]).result.
                    
25                                 page(params[:page]).per(params[:per_page])
                    
                
links_controller.rb https://github.com/seaneshbaugh/portfolio.git | Ruby | 85 lines
                    
7
                    
8      @search = Link.ransack(params[:q])
                    
9
                    
                
pictures_controller.rb https://github.com/seaneshbaugh/portfolio.git | Ruby | 117 lines
                    
7
                    
8      @search = Picture.ransack(params[:q])
                    
9
                    
                
pages_controller.rb https://github.com/magiclabs/alchemy_cms.git | Ruby | 129 lines
                    
19      @pages = @pages.includes(*page_includes)
                    
20      @pages = @pages.ransack(params[:q]).result
                    
21
                    
                
users_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 166 lines
                    
107          else
                    
108            @search = Spree.user_class.ransack(params[:q])
                    
109            @collection = @search.result.page(params[:page]).per(Spree::Config[:admin_products_per_page])
                    
                
pages_controller.rb https://github.com/seaneshbaugh/portfolio.git | Ruby | 85 lines
                    
7
                    
8      @search = Page.ransack(params[:q])
                    
9
                    
                
products_controller.rb git://github.com/spree/spree.git | Ruby | 131 lines
                    
10                      else
                    
11                        product_scope.ransack(params[:q]).result
                    
12                      end
                    
                
shipments_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 163 lines
                    
15              .includes(mine_includes)
                    
16              .ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
17          else
                    
                
stock_transfers_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 53 lines
                    
6      def index
                    
7        @q = StockTransfer.ransack(params[:q])
                    
8
                    
                
option_values_controller.rb https://github.com/tomz/spree.git | Ruby | 58 lines
                    
7        else
                    
8          @option_values = scope.ransack(params[:q]).result
                    
9        end
                    
                
product_properties_controller.rb git://github.com/spree/spree.git | Ruby | 73 lines
                    
9          @product_properties = @product.product_properties.accessible_by(current_ability).
                    
10                                ransack(params[:q]).result.
                    
11                                page(params[:page]).per(params[:per_page])
                    
                
taxonomies_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 66 lines
                    
47          @taxonomies = Taxonomy.accessible_by(current_ability, :read).order('name').includes(:root => :children).
                    
48                        ransack(params[:q]).result.
                    
49                        page(params[:page]).per(params[:per_page])
                    
                
stock_locations_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 52 lines
                    
6          authorize! :read, StockLocation
                    
7          @stock_locations = StockLocation.accessible_by(current_ability, :read).order('name ASC').ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
8          respond_with(@stock_locations)
                    
                
wholesalers_controller.rb https://github.com/citrus/spree_wholesale.git | Ruby | 82 lines
                    
78    params[:search][:meta_sort] ||= "company.asc"
                    
79    @search = Spree::Wholesaler.ransack(params[:q])
                    
80    @collection = @search.result.page(params[:page]).per(Spree::Config[:admin_products_per_page])
                    
                
search_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 41 lines
                    
30        else
                    
31          @products = Product.ransack(params[:q]).result
                    
32        end
                    
                
products_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 126 lines
                    
9          else
                    
10            @products = product_scope.ransack(params[:q]).result
                    
11          end
                    
                
taxons_controller.rb https://github.com/tomz/spree.git | Ruby | 93 lines
                    
10          else
                    
11            @taxons = Spree::Taxon.accessible_by(current_ability, :read).order(:taxonomy_id, :lft).ransack(params[:q]).result
                    
12          end
                    
66        taxon = Spree::Taxon.find(params[:id])
                    
67        @products = taxon.products.ransack(params[:q]).result
                    
68        @products = @products.page(params[:page]).per(500 || params[:per_page])
                    
                
products_controller.rb https://github.com/pageman/spree.git | Ruby | 56 lines
                    
9        else
                    
10          @products = product_scope.ransack(params[:q]).result
                    
11        end
                    
                
orders_controller.rb https://github.com/fig/spree.git | Ruby | 155 lines
                    
44
                    
45        @search = Spree::Order.preload(:user).accessible_by(current_ability, :index).ransack(params[:q])
                    
46
                    
                
taxons_controller.rb https://github.com/pageman/spree.git | Ruby | 78 lines
                    
12          else
                    
13            @taxons = Taxon.ransack(params[:q]).result
                    
14          end
                    
                
products_controller.rb https://github.com/jmbejar/spree.git | Ruby | 115 lines
                    
83
                    
84          @search = super.ransack(params[:q])
                    
85          @collection = @search.result.
                    
                
payments_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 82 lines
                    
9        def index
                    
10          @payments = @order.payments.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
11          respond_with(@payments)
                    
                
stock_movements_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 45 lines
                    
8          authorize! :read, StockMovement
                    
9          @stock_movements = scope.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
10          respond_with(@stock_movements)
                    
                
orders_controller.rb https://github.com/jmbejar/spree.git | Ruby | 133 lines
                    
36
                    
37        @search = Order.accessible_by(current_ability, :index).ransack(params[:q])
                    
38        @orders = @search.result.includes([:user, :shipments, :payments]).
                    
                
properties_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 72 lines
                    
13          else
                    
14            @properties = @properties.ransack(params[:q]).result
                    
15          end
                    
                
products_controller.rb https://github.com/jsqu99/spree.git | Ruby | 138 lines
                    
103          # @search needs to be defined as this is passed to search_form_for
                    
104          @search = @collection.ransack(params[:q])
                    
105          @collection = @search.result.
                    
                
promotions_controller.rb https://github.com/fig/spree.git | Ruby | 37 lines
                    
24        @collection = super
                    
25        @search = @collection.ransack(params[:q])
                    
26        @collection = @search.result(distinct: true).
                    
                
zones_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 51 lines
                    
22        def index
                    
23          @zones = Zone.accessible_by(current_ability, :read).order('name ASC').ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
24          respond_with(@zones)
                    
                
states_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 40 lines
                    
9        def index
                    
10          @states = scope.ransack(params[:q]).result.
                    
11                      includes(:country).order('name ASC')
                    
                
orders_controller.rb https://github.com/slavix/spree.git | Ruby | 131 lines
                    
41        authorize! :index, Order
                    
42        @orders = Order.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
43        respond_with(@orders)
                    
67        if current_api_user.persisted?
                    
68          @orders = current_api_user.orders.reverse_chronological.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
69        else
                    
                
option_types_controller.rb https://github.com/tomz/spree.git | Ruby | 49 lines
                    
7        else
                    
8          @option_types = Spree::OptionType.accessible_by(current_ability, :read).load.ransack(params[:q]).result
                    
9        end
                    
                
taxonomies_controller.rb https://github.com/tomz/spree.git | Ruby | 64 lines
                    
46        @taxonomies = Taxonomy.accessible_by(current_ability, :read).order('name').includes(:root => :children).
                    
47                      ransack(params[:q]).result.
                    
48                      page(params[:page]).per(params[:per_page])
                    
                
orders_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 149 lines
                    
36
                    
37        @search = Order.preload(:user).accessible_by(current_ability, :index).ransack(params[:q])
                    
38
                    
                
payments_controller.rb https://github.com/tomz/spree.git | Ruby | 94 lines
                    
8      def index
                    
9        @payments = @order.payments.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
10        respond_with(@payments)
                    
                
users_controller.rb https://github.com/andrewmp1/spree.git | Ruby | 68 lines
                    
26          unless request.xhr?
                    
27            @search = Spree::User.registered.ransack(params[:q])
                    
28            @collection = @search.result.page(params[:page]).per(Spree::Config[:admin_products_per_page])
                    
                
enterprises_controller.rb https://gitlab.com/srihas/openfoodnetwork | Ruby | 70 lines
                    
10    def managed
                    
11      @enterprises = Enterprise.ransack(params[:q]).result.managed_by(current_api_user)
                    
12      render params[:template] || :bulk_index
                    
                
orders_controller.rb https://github.com/eraserx99/spree.git | Ruby | 78 lines
                    
17        def search
                    
18          @orders = Order.ransack(params[:q]).result.page(params[:page])
                    
19          render :index
                    
                
variants_controller.rb git://github.com/spree/spree.git | Ruby | 81 lines
                    
27          @variants = scope.includes(*variant_includes).for_currency_and_available_price_amount.
                    
28                      ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
29          respond_with(@variants)
                    
                
properties_controller.rb https://github.com/tomz/spree.git | Ruby | 70 lines
                    
12        else
                    
13          @properties = @properties.ransack(params[:q]).result
                    
14        end
                    
                
taxons_controller.rb git://github.com/spree/spree.git | Ruby | 95 lines
                    
12                    end
                    
13          @taxons = @taxons.ransack(params[:q]).result
                    
14          @taxons = @taxons.page(params[:page]).per(params[:per_page])
                    
67          taxon = Spree::Taxon.find(params[:id])
                    
68          @products = taxon.products.ransack(params[:q]).result
                    
69          @products = @products.page(params[:page]).per(params[:per_page] || 500)
                    
                
images_controller.rb https://gitlab.com/slice-group/speakers-web.git | Ruby | 91 lines
                    
8    def index
                    
9      @q = Image.ransack(params[:q])
                    
10      images = @q.result(distinct: true)
                    
                
products_controller_decorator.rb https://gitlab.com/srihas/openfoodnetwork | Ruby | 71 lines
                    
7
                    
8    @products = product_scope.ransack(params[:q]).result.managed_by(current_api_user).page(params[:page]).per(params[:per_page])
                    
9    respond_with(@products, default_template: :index)
                    
16      order('created_at DESC').
                    
17      ransack(params[:q]).result.
                    
18      page(params[:page]).per(params[:per_page])
                    
62      by_producer.by_name.
                    
63      ransack(params[:q]).result.
                    
64      page(params[:page]).per(params[:per_page])
                    
                
option_types_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 54 lines
                    
8          else
                    
9            @option_types = Spree::OptionType.includes(:option_values).accessible_by(current_ability, :read).load.ransack(params[:q]).result
                    
10          end
                    
                
books_controller.rb https://gitlab.com/igorduarte/Library.git | Ruby | 77 lines
                    
8    #@books = Book.all
                    
9    @q = Book.ransack(params[:q])
                    
10    @books = @q.result
                    
                
stock_locations_controller.rb https://github.com/tomz/spree.git | Ruby | 50 lines
                    
5        authorize! :read, StockLocation
                    
6        @stock_locations = StockLocation.accessible_by(current_ability, :read).order('name ASC').ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
7        respond_with(@stock_locations)
                    
                
product_properties_controller.rb https://github.com/tomz/spree.git | Ruby | 72 lines
                    
9        @product_properties = @product.product_properties.accessible_by(current_ability, :read).
                    
10                              ransack(params[:q]).result.
                    
11                              page(params[:page]).per(params[:per_page])
                    
                
variants_controller.rb https://gitlab.com/adamlwalker/spree | Ruby | 75 lines
                    
27          @variants = scope.includes({ option_values: :option_type }, :product, :default_price, :images, { stock_items: :stock_location })
                    
28            .ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
29          respond_with(@variants)
                    
                
users_controller.rb https://github.com/fig/spree.git | Ruby | 67 lines
                    
12                   else
                    
13                     @users.ransack(params[:q])
                    
14                   end
                    
                
stock_movements_controller.rb https://github.com/tomz/spree.git | Ruby | 43 lines
                    
7        authorize! :read, StockMovement
                    
8        @stock_movements = scope.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
9        respond_with(@stock_movements)
                    
                
return_index_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 28 lines
                    
21        # @search needs to be defined as this is passed to search_form_for
                    
22        @search = @collection.ransack(params[:q])
                    
23        per_page = params[:per_page] || Spree::Config[:admin_products_per_page]
                    
                
variants_controller.rb https://github.com/slavix/spree.git | Ruby | 74 lines
                    
26        @variants = scope.includes({ option_values: :option_type }, :product, :default_price, :images, { stock_items: :stock_location })
                    
27          .ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
28
                    
                
orders_controller.rb https://github.com/crystalneth/spree.git | Ruby | 130 lines
                    
37
                    
38        @search = Order.ransack(params[:q])
                    
39        @orders = @search.result(:distinct => true).
                    
                
users_controller.rb https://github.com/tomz/spree.git | Ruby | 53 lines
                    
5      def index
                    
6        @users = Spree.user_class.accessible_by(current_ability,:read).ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
7        respond_with(@users)
                    
                
zones_controller.rb https://github.com/tomz/spree.git | Ruby | 46 lines
                    
21      def index
                    
22        @zones = Zone.accessible_by(current_ability, :read).order('name ASC').ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
23        respond_with(@zones)
                    
                
courses_controller.rb https://gitlab.com/cd2/developingexperts | Ruby | 77 lines
                    
5    if signed_in_as_administrator?
                    
6      @q = @school.courses.ransack(params[:q])
                    
7    else
                    
7    else
                    
8      @q = current_user.courses.ransack(params[:q])
                    
9    end
                    
                
google_analytics_tracks_controller.rb https://gitlab.com/slice-group/speakers-web.git | Ruby | 92 lines
                    
8    def index
                    
9      @q = GoogleAnalyticsTrack.ransack(params[:q])
                    
10      google_analytics_tracks = @q.result(distinct: true)
                    
                
dashboards_controller.rb https://bitbucket.org/Ankit4991/dr.-crm.git | Ruby | 372 lines
                    
58    else
                    
59      @patients_search = current_organisation.joint_resources.ransack(params[:q])
                    
60      @patients = @patients_search.result.includes(:patient,:examinations,:favourites,:referrals,:orders).order("patients.updated_at DESC").paginate(:page => params[:page], :per_page => 30)
                    
75      @exams = current_organisation.examinations.where(joint_resource_id: @patient.try(:joint_resource).try(:id)).order('updated_at DESC')
                    
76      @search = current_organisation.orders.where(joint_resource_id: @patient.try(:joint_resource).try(:id)).order('order_date DESC').ransack(params[:q])
                    
77      @orders =  @search.result.includes(:doctor).paginate(:page => params[:customer_orders_page], :per_page => 10)
                    
                
taxonomies_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 69 lines
                    
50          @taxonomies = Taxonomy.accessible_by(current_ability, :read).order('name').includes(root: :children).
                    
51                        ransack(params[:q]).result.
                    
52                        page(params[:page]).per(params[:per_page])
                    
                
option_types_controller.rb git://github.com/spree/spree.git | Ruby | 60 lines
                    
14                               accessible_by(current_ability).
                    
15                               load.ransack(params[:q]).result
                    
16                           end
                    
                
posts_controller.rb https://github.com/seaneshbaugh/portfolio.git | Ruby | 83 lines
                    
9
                    
10      @search = Post.ransack(params[:q])
                    
11
                    
                
blogs_controller.rb https://gitlab.com/sulmanweb/Bloggy2 | Ruby | 86 lines
                    
8    if params[:q].present?
                    
9      @q = Blog.ransack(params[:q])
                    
10      @blogs = @q.result(distinct: true).order('created_at DESC')
                    
                
order_cycles_controller.rb https://gitlab.com/srihas/openfoodnetwork | Ruby | 25 lines
                    
6      authorize! :read, OrderCycle
                    
7      @order_cycles = OrderCycle.ransack(params[:q]).result.managed_by(current_api_user)
                    
8      render params[:template] || :bulk_index
                    
12      @order_cycles = if params[:as] == "distributor"
                    
13        OrderCycle.ransack(params[:q]).result.
                    
14        involving_managed_distributors_of(current_api_user).order('updated_at DESC')
                    
15      elsif params[:as] == "producer"
                    
16        OrderCycle.ransack(params[:q]).result.
                    
17        involving_managed_producers_of(current_api_user).order('updated_at DESC')
                    
18      else
                    
19        OrderCycle.ransack(params[:q]).result.accessible_by(current_api_user)
                    
20      end
                    
                
products_controller.rb https://github.com/Aeon/spree.git | Ruby | 52 lines
                    
9        def search
                    
10          @products = product_scope.ransack(params[:q]).result.page(params[:page])
                    
11          render :index
                    
                
posts_controller.rb https://gitlab.com/lporras/text-search-example | Ruby | 44 lines
                    
9  def index
                    
10    @search = Post.ransack(params[:q])
                    
11    @posts = @search.result.page(params[:page])
                    
                
states_controller.rb https://gitlab.com/shinvdu/spree | Ruby | 37 lines
                    
7        def index
                    
8          @states = scope.ransack(params[:q]).result.includes(:country)
                    
9
                    
                
shipments_controller.rb git://github.com/spree/spree.git | Ruby | 186 lines
                    
14                         includes(mine_includes).
                    
15                         ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
16          else
                    
                
orders_controller.rb https://github.com/pageman/spree.git | Ruby | 68 lines
                    
10        raise CanCan::AccessDenied unless current_api_user.has_spree_role?("admin")
                    
11        @orders = Order.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
12        respond_with(@orders)
                    
                
option_values_controller.rb git://github.com/spree/spree.git | Ruby | 62 lines
                    
8                           else
                    
9                             scope.ransack(params[:q]).result.distinct
                    
10                           end
                    
                
contacts_controller.rb https://bitbucket.org/elnikov/exam.git | Ruby | 77 lines
                    
17    
                    
18    @q = Contact.ransack(params[:q])
                    
19    @contacts = @q.result(distinct: true)
                    
                
stock_items_controller.rb https://github.com/slavix/spree.git | Ruby | 75 lines
                    
6      def index
                    
7        @stock_items = scope.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
8        respond_with(@stock_items)
                    
                
taxonomies_controller.rb https://github.com/pageman/spree.git | Ruby | 56 lines
                    
7        @taxonomies = Taxonomy.order('name').includes(:root => :children).
                    
8                      ransack(params[:q]).result.
                    
9                      page(params[:page]).per(params[:per_page])
                    
                
states_controller.rb https://github.com/slavix/spree.git | Ruby | 38 lines
                    
8      def index
                    
9        @states = scope.ransack(params[:q]).result.
                    
10                    includes(:country).order('name ASC')
                    
                
family_members.rb https://bitbucket.org/Ankit4991/dr.-crm.git | Ruby | 241 lines
                    
84	    	@exams = current_organisation.examinations.where(joint_resource_id: @family_member.try(:joint_resource).try(:id)).order('updated_at DESC')
                    
85	    	@search = current_organisation.orders.where(joint_resource_id: @family_member.try(:joint_resource).try(:id)).order('order_date DESC').ransack(params[:q])
                    
86	    	@orders =  @search.result.includes(:doctor).paginate(:page => params[:customer_orders_page], :per_page => 10)
                    
                
orders_controller.rb git://github.com/spree/spree.git | Ruby | 107 lines
                    
34        authorize! :index, Order
                    
35        @orders = Order.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
36        respond_with(@orders)
                    
                
stock_movements_controller.rb git://github.com/spree/spree.git | Ruby | 45 lines
                    
8          authorize! :index, StockMovement
                    
9          @stock_movements = scope.ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
                    
10          respond_with(@stock_movements)
                    
                
google_adwords_controller.rb https://gitlab.com/slice-group/speakers-web.git | Ruby | 97 lines
                    
8    def index
                    
9      @q = GoogleAdword.ransack(params[:q])
                    
10      google_adwords = @q.result(distinct: true)
                    
                
properties_controller.rb git://github.com/spree/spree.git | Ruby | 70 lines
                    
12                        else
                    
13                          @properties.ransack(params[:q]).result
                    
14                        end
                    
                
meta_tags_controller.rb https://gitlab.com/slice-group/speakers-web.git | Ruby | 93 lines
                    
8    def index
                    
9      @q = MetaTag.ransack(params[:q])
                    
10      meta_tags = @q.result(distinct: true)
                    
                
return_authorizations_controller.rb git://github.com/spree/spree.git | Ruby | 70 lines
                    
23          @return_authorizations = order.return_authorizations.accessible_by(current_ability).
                    
24                                   ransack(params[:q]).result.
                    
25                                   page(params[:page]).per(params[:per_page])
                    
                
 

Source

Language