Skip to content

Commit

Permalink
Removed trailing whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunn committed Dec 18, 2012
1 parent 608698f commit cee9a89
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/rails_admin/config/fields/base.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def value
register_instance_option :allowed_methods do register_instance_option :allowed_methods do
[method_name] [method_name]
end end

def parse_input(params) def parse_input(params)
# overriden # overriden
end end
Expand Down
2 changes: 1 addition & 1 deletion lib/rails_admin/config/fields/factories/association.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
end.map{|k| association[k] }.compact end.map{|k| association[k] }.compact


parent.abstract_model.properties.select{|p| possible_field_names.include? p[:name] }.each do |column| parent.abstract_model.properties.select{|p| possible_field_names.include? p[:name] }.each do |column|
unless child_field = fields.find{|f| f.name.to_s == column[:name].to_s } unless child_field = fields.find{|f| f.name.to_s == column[:name].to_s }
child_field = RailsAdmin::Config::Fields.default_factory.call(parent, column, fields) child_field = RailsAdmin::Config::Fields.default_factory.call(parent, column, fields)
end end
child_columns << child_field child_columns << child_field
Expand Down
4 changes: 2 additions & 2 deletions lib/rails_admin/config/fields/types/boolean.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class Boolean < RailsAdmin::Config::Fields::Base
case value case value
when nil when nil
%{<span class="badge">-</span>} %{<span class="badge">-</span>}
when false when false
%{<span class="badge badge-important">&#x2718;</span>} %{<span class="badge badge-important">&#x2718;</span>}
when true when true
%{<span class="badge badge-success">&#x2713;</span>} %{<span class="badge badge-success">&#x2713;</span>}
end.html_safe end.html_safe
end end
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy_app/app/active_record/comment.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
class Comment < ActiveRecord::Base class Comment < ActiveRecord::Base
attr_accessible :commentable_id, :commentable_type, :content attr_accessible :commentable_id, :commentable_type, :content

belongs_to :commentable, :polymorphic => true belongs_to :commentable, :polymorphic => true
end end
2 changes: 1 addition & 1 deletion spec/dummy_app/app/active_record/team.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class Team < ActiveRecord::Base class Team < ActiveRecord::Base
attr_accessible :name, :division, :division_id, :logo_url, :manager, :ballpark, :mascot, :founded, :wins, :losses, :win_percentage, :revenue, :color, :custom_field, :fan_ids, :player_ids, :comment_ids attr_accessible :name, :division, :division_id, :logo_url, :manager, :ballpark, :mascot, :founded, :wins, :losses, :win_percentage, :revenue, :color, :custom_field, :fan_ids, :player_ids, :comment_ids



has_many :players, :inverse_of => :team, :order => :id has_many :players, :inverse_of => :team, :order => :id
has_and_belongs_to_many :fans has_and_belongs_to_many :fans
has_many :comments, :as => :commentable has_many :comments, :as => :commentable
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy_app/app/mongoid/team.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Team
field :revenue, :type => BigDecimal field :revenue, :type => BigDecimal
field :color, :type => String field :color, :type => String
field :custom_field, :type => String field :custom_field, :type => String

attr_accessible :name, :division, :division_id, :logo_url, :manager, :ballpark, :mascot, :founded, :wins, :losses, :win_percentage, :revenue, :color, :custom_field, :fan_ids, :player_ids, :comment_ids attr_accessible :name, :division, :division_id, :logo_url, :manager, :ballpark, :mascot, :founded, :wins, :losses, :win_percentage, :revenue, :color, :custom_field, :fan_ids, :player_ids, :comment_ids


has_many :players, :inverse_of => :team, :order => :_id.asc has_many :players, :inverse_of => :team, :order => :_id.asc
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@


@league = FactoryGirl.create :league @league = FactoryGirl.create :league
@divisions = 3.times.map { Division.create!(:name => "div #{Time.now.to_f}", :league => League.create!(:name => "league #{Time.now.to_f}")) } @divisions = 3.times.map { Division.create!(:name => "div #{Time.now.to_f}", :league => League.create!(:name => "league #{Time.now.to_f}")) }

page.driver.put edit_path(:model_name => "league", :id => @league.id, :league => {:name => "National League", :division_ids => [@divisions[0].id] }) page.driver.put edit_path(:model_name => "league", :id => @league.id, :league => {:name => "National League", :division_ids => [@divisions[0].id] })

old_name = @league.name old_name = @league.name
@league.reload @league.reload
expect(@league.name).to eq("National League") expect(@league.name).to eq("National League")
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ class HelpTest < Tableless
after :each do after :each do
I18n.locale = :en I18n.locale = :en
end end

it "delegates the label option to the ActiveModel API and memoizes it" do it "delegates the label option to the ActiveModel API and memoizes it" do
RailsAdmin.config Team do RailsAdmin.config Team do
edit do edit do
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def do_request
describe "css hooks" do describe "css hooks" do
it "is present" do it "is present" do
do_request do_request

should have_selector("dt .name_field.string_type") should have_selector("dt .name_field.string_type")
end end
end end
Expand Down

0 comments on commit cee9a89

Please sign in to comment.