"semantic_errors" helper #60

Merged
merged 2 commits into from Apr 4, 2013

Conversation

Projects
None yet
4 participants
@nzaillian
Contributor

nzaillian commented Mar 17, 2013

formtastic-bootstrap doesn't seem to contain a bootstrap-friendly "semantic_errors" helper. I needed one so I added it. Renders errors in a bootstrap "alert-error" div. Added specs as well. Here's a screencap (disregard the bit of custom styling for my particular application): http://imgur.com/Xgn9ruz. Merge if you see fit.

.gitignore
+
+.idea
+
+log

This comment has been minimized.

Show comment Hide comment
@sodabrew

sodabrew Mar 18, 2013

Collaborator

What are these files?

@sodabrew

sodabrew Mar 18, 2013

Collaborator

What are these files?

This comment has been minimized.

Show comment Hide comment
@nzaillian

nzaillian Mar 19, 2013

Contributor

RubyMine config XML files are kept in ".idea", my respec config writes to a file in "log". You're right, though, should not have committed: probably only relevant for a minority of contributors.

@nzaillian

nzaillian Mar 19, 2013

Contributor

RubyMine config XML files are kept in ".idea", my respec config writes to a file in "log". You're right, though, should not have committed: probably only relevant for a minority of contributors.

This comment has been minimized.

Show comment Hide comment
@sodabrew

sodabrew Mar 19, 2013

Collaborator

Thanks! Would you mind doing a git commit --amend and pushing a new edition without these?

@sodabrew

sodabrew Mar 19, 2013

Collaborator

Thanks! Would you mind doing a git commit --amend and pushing a new edition without these?

This comment has been minimized.

Show comment Hide comment
@nzaillian

nzaillian Mar 19, 2013

Contributor

OK, amended that

@nzaillian

nzaillian Mar 19, 2013

Contributor

OK, amended that

@sodabrew

This comment has been minimized.

Show comment Hide comment
@sodabrew

sodabrew Mar 18, 2013

Collaborator

Looks good! Just want to make sure that the gitignores are generally useful.

Collaborator

sodabrew commented Mar 18, 2013

Looks good! Just want to make sure that the gitignores are generally useful.

lib/formtastic-bootstrap/helpers.rb
autoload :FieldsetWrapper, 'formtastic-bootstrap/helpers/fieldset_wrapper'
- # autoload :FileColumnDetection, 'formtastic/helpers/file_column_detection'

This comment has been minimized.

Show comment Hide comment
@sodabrew

sodabrew Mar 19, 2013

Collaborator

Another question - what's the purpose of removing these commented-out lines?

@sodabrew

sodabrew Mar 19, 2013

Collaborator

Another question - what's the purpose of removing these commented-out lines?

This comment has been minimized.

Show comment Hide comment
@nzaillian

nzaillian Mar 19, 2013

Contributor

It just seemed odd to have them there if of no effect, but can put them back if you'd rather that.

@nzaillian

nzaillian Mar 19, 2013

Contributor

It just seemed odd to have them there if of no effect, but can put them back if you'd rather that.

This comment has been minimized.

Show comment Hide comment
@sodabrew

sodabrew Mar 19, 2013

Collaborator

I prefer to keep the changes to just the minimum required to implement your functionality. Would you amend the commit here to only change the ErrorsHelper line?

@sodabrew

sodabrew Mar 19, 2013

Collaborator

I prefer to keep the changes to just the minimum required to implement your functionality. Would you amend the commit here to only change the ErrorsHelper line?

@sodabrew

This comment has been minimized.

Show comment Hide comment
@sodabrew

sodabrew Apr 1, 2013

Collaborator

Hi! @nzaillian pinging to see if you've had time to update your branch? I'm looking forward to merging this PR soon!

Collaborator

sodabrew commented Apr 1, 2013

Hi! @nzaillian pinging to see if you've had time to update your branch? I'm looking forward to merging this PR soon!

@nzaillian

This comment has been minimized.

Show comment Hide comment
@nzaillian

nzaillian Apr 4, 2013

Contributor

Hey, sorry this all fell by the wayside lately. I found myself needing this helper today again, though and wishing it were in the gem. Let me know if you need any more changes (I'll jump on it sooner this time)

Contributor

nzaillian commented Apr 4, 2013

Hey, sorry this all fell by the wayside lately. I found myself needing this helper today again, though and wishing it were in the gem. Let me know if you need any more changes (I'll jump on it sooner this time)

sodabrew added a commit that referenced this pull request Apr 4, 2013

@sodabrew sodabrew merged commit b8a2a4e into mjbellantoni:master Apr 4, 2013

@djwonk

This comment has been minimized.

Show comment Hide comment
@djwonk

djwonk Apr 10, 2013

This commit causes the specs to halt (not just fail).

bundle exec rake spec

formtastic-bootstrap/lib/formtastic-bootstrap/form_builder.rb:34:in `<class:FormBuilder>': uninitialized constant FormtasticBootstrap::Helpers::ErrorsHelper (NameError)
  from /Users/david/src/formtastic-bootstrap/lib/formtastic-bootstrap/form_builder.rb:3:in `<module:FormtasticBootstrap>'
  from /Users/david/src/formtastic-bootstrap/lib/formtastic-bootstrap/form_builder.rb:1:in `<top (required)>'
  from /Users/david/src/formtastic-bootstrap/lib/formtastic-bootstrap.rb:4:in `<top (required)>'

djwonk commented on 057f708 Apr 10, 2013

This commit causes the specs to halt (not just fail).

bundle exec rake spec

formtastic-bootstrap/lib/formtastic-bootstrap/form_builder.rb:34:in `<class:FormBuilder>': uninitialized constant FormtasticBootstrap::Helpers::ErrorsHelper (NameError)
  from /Users/david/src/formtastic-bootstrap/lib/formtastic-bootstrap/form_builder.rb:3:in `<module:FormtasticBootstrap>'
  from /Users/david/src/formtastic-bootstrap/lib/formtastic-bootstrap/form_builder.rb:1:in `<top (required)>'
  from /Users/david/src/formtastic-bootstrap/lib/formtastic-bootstrap.rb:4:in `<top (required)>'

This comment has been minimized.

Show comment Hide comment
@nzaillian

nzaillian Apr 10, 2013

Contributor

I'll look into it right now

Contributor

nzaillian replied Apr 10, 2013

I'll look into it right now

This comment has been minimized.

Show comment Hide comment
@djwonk

djwonk Apr 10, 2013

My pull request is here: #64

My pull request is here: #64

@nzaillian nzaillian referenced this pull request Apr 10, 2013

Closed

fix for load error #65

nbrew pushed a commit to nbrew/formtastic-bootstrap that referenced this pull request Apr 19, 2013

@owocki

This comment has been minimized.

Show comment Hide comment
@owocki

owocki Jun 13, 2013

i'm not sure if it's because i'm a rails noob or not, but im getting a syntax error here

/Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap/form_builder.rb:34: /Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap/helpers/errors_helper.rb:63: syntax error, unexpected ':' (SyntaxError)
          template.content_tag(:ul, {class: "error-list"}) do
                                           ^
/Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap/helpers/errors_helper.rb:63: syntax error, unexpected '}', expecting kEND
          template.content_tag(:ul, {class: "error-list"}) do
                                                         ^
/Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap/helpers/errors_helper.rb:70: syntax error, unexpected kEND, expecting $end
    from /Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap.rb:4:in `require'
    from /Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap.rb:4
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler.rb:119:in `require'
    from /Users/kevinowocki/Sites/slowordown/config/application.rb:7
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50
    from script/rails:6:in `require'
    from script/rails:6

Rails 3.2.13

i'm not sure if it's because i'm a rails noob or not, but im getting a syntax error here

/Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap/form_builder.rb:34: /Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap/helpers/errors_helper.rb:63: syntax error, unexpected ':' (SyntaxError)
          template.content_tag(:ul, {class: "error-list"}) do
                                           ^
/Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap/helpers/errors_helper.rb:63: syntax error, unexpected '}', expecting kEND
          template.content_tag(:ul, {class: "error-list"}) do
                                                         ^
/Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap/helpers/errors_helper.rb:70: syntax error, unexpected kEND, expecting $end
    from /Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap.rb:4:in `require'
    from /Library/Ruby/Gems/1.8/gems/formtastic-bootstrap-2.1.1/lib/formtastic-bootstrap.rb:4
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler.rb:119:in `require'
    from /Users/kevinowocki/Sites/slowordown/config/application.rb:7
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50
    from script/rails:6:in `require'
    from script/rails:6

Rails 3.2.13

This comment has been minimized.

Show comment Hide comment
@sodabrew

sodabrew Jun 13, 2013

Collaborator

This is Ruby 1.9 syntax. Pushing a fix right now so that it will run on Ruby 1.8.

Collaborator

sodabrew replied Jun 13, 2013

This is Ruby 1.9 syntax. Pushing a fix right now so that it will run on Ruby 1.8.

This comment has been minimized.

Show comment Hide comment
@sodabrew

sodabrew Jun 13, 2013

Collaborator

Fixed in version 2.1.3, just posted to Rubygems.

Collaborator

sodabrew replied Jun 13, 2013

Fixed in version 2.1.3, just posted to Rubygems.

This comment has been minimized.

Show comment Hide comment
@owocki

owocki Jun 13, 2013

you'z a boss. thanks.

you'z a boss. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment