Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Whitespaces

  • Loading branch information...
commit 619888ad5bd1d81b80bdda2dd9fa821fcdf917be 1 parent 5da1254
@rafaelfranca rafaelfranca authored
View
2  lib/simple_form/action_view_extensions/form_helper.rb
@@ -40,7 +40,7 @@ def simple_form_for(record, options={}, &block)
form_for(record, options, &block)
end
end
-
+
def css_class(record, html_options)
if html_options.key?(:class)
html_options[:class]
View
4 lib/simple_form/helpers/has_errors.rb
@@ -2,7 +2,7 @@ module SimpleForm
module Helpers
module HasErrors
private
-
+
def errors
object.errors
end
@@ -12,4 +12,4 @@ def has_errors?
end
end
end
-end
+end
View
4 test/action_view_extensions/form_helper_test.rb
@@ -46,12 +46,12 @@ class FormHelperTest < ActionView::TestCase
concat(simple_form_for(@user) do |f| end)
assert_select 'form.simple_form.user'
end
-
+
test 'simple form should not add object class to form if css_class is specified' do
concat(simple_form_for(:user, :html => {:class => nil}) do |f| end)
assert_no_select 'form.user'
end
-
+
test 'simple form should add custom class to form if css_class is specified' do
concat(simple_form_for(:user, :html => {:class => 'my_class'}) do |f| end)
assert_select 'form.my_class'
View
4 test/discovery_inputs.rb
@@ -14,8 +14,8 @@ class CustomizedInput < SimpleForm::Inputs::StringInput
def input
"<section>#{super}</section>".html_safe
end
-
+
def input_method
:text_field
end
-end
+end
View
6 test/form_builder_test.rb
@@ -408,10 +408,10 @@ def with_association_for(object, *args)
assert_select 'form p input#user_name.string'
end
end
-
+
test 'builder support no wrapping when wrapper is false' do
- with_form_for @user, :name, :wrapper => false
- assert_select 'form > label[for=user_name]'
+ with_form_for @user, :name, :wrapper => false
+ assert_select 'form > label[for=user_name]'
assert_select 'form > input#user_name.string'
end
Please sign in to comment.
Something went wrong with that request. Please try again.