Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Don't use ActionView::Helpers::InstanceTag.check_box_checked? anymore #915

Merged
merged 1 commit into from

4 participants

@martijn

Even though ActionView::Helpers::InstanceTag exists in Rails 4, the check_box_checked? method is gone, so the defined? check that was put in earlier did not have the desired effect.

I propose to always use our own boolean_checked? method since that works across all Rails versions.

This fixes the rendering of check boxes in Rails 4 (edge Rails).

@sobrinho
Collaborator

Seems good.

@justinfrench ?

@justinfrench

+1

@twalpole
Collaborator

+1

@sobrinho sobrinho merged commit 4eaeab1 into from
@sobrinho
Collaborator

Merged, thanks! :heart:

@twalpole
Collaborator

@sobrinho - sorry I missed that this pull requests was into the rails4 branch -- the rails4 branch was merged into master a while ago and is out of date now -- we should probably just get rid of the rails4 branch since master passes all tests against rails4

@sobrinho
Collaborator

@twalpole sorry, I didn't see this either.

@justinfrench can you make sure that the rails4 branch can be deleted?

@justinfrench

@sobrinho @twalpole

$ git lg origin/master..origin/rails4
4eaeab1 Merge pull request #915 from bluerail/rails4
71a3bd2 Don't use ActionView::Helpers::InstanceTag.check_box_checked? anymore

Looks like it's only this PR in rails4 exclusively, so I've merged rails4 into master:

$ git co master
$ git merge rails4
Auto-merging lib/formtastic/inputs/boolean_input.rb
Merge made by the 'recursive' strategy.
 lib/formtastic/inputs/boolean_input.rb | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
$ git push

And I've burned the rails4 branch:

$ git branch -d rails4
Deleted branch rails4 (was 4eaeab1).
$ git push origin :rails4
To git@github.com:justinfrench/formtastic.git
 - [deleted]         rails4

Unsure if anything has to be done with CI, we'll see I guess :)

@martijn martijn deleted the branch
@irregularprofit irregularprofit referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@irregularprofit irregularprofit referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/formtastic/inputs/boolean_input.rb
View
6 lib/formtastic/inputs/boolean_input.rb
@@ -97,11 +97,7 @@ def input_html_options_name
end
def checked?
- if defined? ActionView::Helpers::InstanceTag
- object && ActionView::Helpers::InstanceTag.check_box_checked?(object.send(method), checked_value)
- else
- object && boolean_checked?(object.send(method), checked_value)
- end
+ object && boolean_checked?(object.send(method), checked_value)
end
private
Something went wrong with that request. Please try again.