rails_admin 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rails_admin might be problematic. Click here for more details.

@@ -54,7 +54,7 @@
54
54
  @import "bootstrap/tooltip";
55
55
  @import "bootstrap/popovers";
56
56
  @import "bootstrap/thumbnails";
57
- @import "bootstrap/labels";
57
+ @import "bootstrap/labels-badges";
58
58
  @import "bootstrap/progress-bars";
59
59
  @import "bootstrap/accordion";
60
60
  @import "bootstrap/carousel";
@@ -131,7 +131,7 @@
131
131
  %td.other.right= link_to "...", @other_right_link, :class => 'pjax'
132
132
  %td.last.links
133
133
  %ul.inline= menu_for :member, @abstract_model, object, true
134
- - unless params[:all]
134
+ - if @objects.respond_to?(:total_count)
135
135
  - total_count = @objects.total_count
136
136
  = paginate(@objects, :theme => 'twitter-bootstrap', :remote => true)
137
137
  = link_to(t("admin.misc.show_all"), index_path(params.merge(:all => true)), :class => "show-all btn clearfix pjax") unless total_count > 100 || total_count <= @objects.to_a.size
@@ -1,3 +1,3 @@
1
1
  module RailsAdmin
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -5,7 +5,7 @@ class Team < ActiveRecord::Base
5
5
  attr_accessible :name, :division_id, :logo_url, :manager, :ballpark, :mascot, :founded, :wins, :losses, :win_percentage, :revenue, :color, :custom_field, :fan_ids, :player_ids, :comment_ids
6
6
 
7
7
  belongs_to :division
8
- has_many :players, :inverse_of => :team
8
+ has_many :players, :inverse_of => :team, :order => :id
9
9
  has_and_belongs_to_many :fans
10
10
  has_many :comments, :as => :commentable
11
11
 
File without changes
@@ -313,6 +313,16 @@ describe "RailsAdmin Basic List" do
313
313
  it "should respond successfully" do
314
314
  2.times.map { FactoryGirl.create :player }
315
315
  visit index_path(:model_name => "player", :all => true)
316
+ find('div.total-count').should have_content("2 players")
317
+ end
318
+ end
319
+
320
+ describe "GET /admin/player show with pagination disabled by :associated_collection" do
321
+ it "should respond successfully" do
322
+ @team = FactoryGirl.create :team
323
+ 2.times.map { FactoryGirl.create :player, :team => @team }
324
+ visit index_path(:model_name => "player", :associated_collection => "players", :compact => true, :current_action => 'update', :source_abstract_model => 'team', :source_object_id => @team.id)
325
+ find('div.total-count').should have_content("2 players")
316
326
  end
317
327
  end
318
328
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-05-10 00:00:00.000000000 Z
15
+ date: 2012-05-15 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bbenezech-nested_form
@@ -560,7 +560,6 @@ files:
560
560
  - config/initializers/haml.rbc
561
561
  - config/initializers/mongoid_extensions.rb
562
562
  - config/initializers/mongoid_extensions.rbc
563
- - config/locales/fr.yml
564
563
  - config/locales/rails_admin.en.yml
565
564
  - config/routes.rb
566
565
  - config/routes.rbc
@@ -855,6 +854,7 @@ files:
855
854
  - spec/dummy_app/config/initializers/session_store.rbc
856
855
  - spec/dummy_app/config/initializers/wrap_parameters.rb
857
856
  - spec/dummy_app/config/initializers/wrap_parameters.rbc
857
+ - spec/dummy_app/config/locales/fr.yml
858
858
  - spec/dummy_app/config/mongoid.yml
859
859
  - spec/dummy_app/config/routes.rb
860
860
  - spec/dummy_app/config/routes.rbc
@@ -1155,6 +1155,7 @@ test_files:
1155
1155
  - spec/dummy_app/config/initializers/session_store.rbc
1156
1156
  - spec/dummy_app/config/initializers/wrap_parameters.rb
1157
1157
  - spec/dummy_app/config/initializers/wrap_parameters.rbc
1158
+ - spec/dummy_app/config/locales/fr.yml
1158
1159
  - spec/dummy_app/config/mongoid.yml
1159
1160
  - spec/dummy_app/config/routes.rb
1160
1161
  - spec/dummy_app/config/routes.rbc