Class: PaginationTest::PaginationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- PaginationTest::PaginationController
- Defined in:
- vendor/plugins/classic_pagination/test/pagination_test.rb
Instance Method Summary
- - (Object) paginate_with_class_name
- - (Object) paginate_with_conditions
- - (Object) paginate_with_include_and_order
- - (Object) paginate_with_join
- - (Object) paginate_with_join_and_count
- - (Object) paginate_with_join_and_group
- - (Object) paginate_with_joins
- - (Object) paginate_with_order
- - (Object) paginate_with_order_by
- - (Object) paginate_with_per_page
- - (Object) paginate_with_singular_name
- - (Object) rescue_action(e)
- - (Object) rescue_errors(e)
- - (Object) simple_paginate
Instance Method Details
- (Object) paginate_with_class_name
44 45 46 47 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 44 def paginate_with_class_name @developer_pages, @developers = paginate(:developers, :class_name => "DeVeLoPeR") render :nothing => true end |
- (Object) paginate_with_conditions
39 40 41 42 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 39 def paginate_with_conditions @topic_pages, @topics = paginate(:topics, :conditions => ["created_at > ?", 30.minutes.ago]) render :nothing => true end |
- (Object) paginate_with_include_and_order
34 35 36 37 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 34 def paginate_with_include_and_order @topic_pages, @topics = paginate(:topics, :include => :replies, :order => 'replies.created_at asc, topics.created_at asc') render :nothing => true end |
- (Object) paginate_with_join
61 62 63 64 65 66 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 61 def paginate_with_join @developer_pages, @developers = paginate(:developers, :join => 'LEFT JOIN developers_projects ON developers.id = developers_projects.developer_id', :conditions => 'project_id=1') render :nothing => true end |
- (Object) paginate_with_join_and_count
68 69 70 71 72 73 74 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 68 def paginate_with_join_and_count @developer_pages, @developers = paginate(:developers, :join => 'd LEFT JOIN developers_projects ON d.id = developers_projects.developer_id', :conditions => 'project_id=1', :count => "d.id") render :nothing => true end |
- (Object) paginate_with_join_and_group
76 77 78 79 80 81 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 76 def paginate_with_join_and_group @developer_pages, @developers = paginate(:developers, :join => 'INNER JOIN developers_projects ON developers.id = developers_projects.developer_id', :group => 'developers.id') render :nothing => true end |
- (Object) paginate_with_joins
54 55 56 57 58 59 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 54 def paginate_with_joins @developer_pages, @developers = paginate(:developers, :joins => 'LEFT JOIN developers_projects ON developers.id = developers_projects.developer_id', :conditions => 'project_id=1') render :nothing => true end |
- (Object) paginate_with_order
24 25 26 27 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 24 def paginate_with_order @topic_pages, @topics = paginate(:topics, :order => 'created_at asc') render :nothing => true end |
- (Object) paginate_with_order_by
29 30 31 32 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 29 def paginate_with_order_by @topic_pages, @topics = paginate(:topics, :order_by => 'created_at asc') render :nothing => true end |
- (Object) paginate_with_per_page
19 20 21 22 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 19 def paginate_with_per_page @topic_pages, @topics = paginate(:topics, :per_page => 1) render :nothing => true end |
- (Object) paginate_with_singular_name
49 50 51 52 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 49 def paginate_with_singular_name @developer_pages, @developers = paginate() render :nothing => true end |
- (Object) rescue_action(e)
85 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 85 def rescue_action(e) raise end |
- (Object) rescue_errors(e)
83 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 83 def rescue_errors(e) raise e end |
- (Object) simple_paginate
14 15 16 17 |
# File 'vendor/plugins/classic_pagination/test/pagination_test.rb', line 14 def simple_paginate @topic_pages, @topics = paginate(:topics) render :nothing => true end |