-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML 5 inputs #387
Comments
This looked so close I merged it in, the sooner we start using this stuff, the sooner it'll be done done. Do we want to do some auto-guessing of these new input types based on column names, (eg columns with I'll do some checks for any CSS tweaking needed in the major browsers. Anything else we need? |
Nope, just need a bit of logic around auto guessing and tests for that. I'll send another pull request shortly. |
Pulled in changes, leaving this open for some CSS/browser checking. |
And the specs fail under Rails 2.x because url_field et al aren't defined, so we need to either find a fall back when they're not defined, or we need to define them, or we need to make them Rails 3 only and find a way for the specs to pass. Not quite there yet! |
Ah, sorry about that. Justin, you need to make a design call here. I'll patch accordingly. In my humble opinion, i think this should be a Rails 3 only thing just to keep the code simple and make formtastic in line with what Rails 3 provides. That said, we can obviously make the code more robust by doing a respond_to check on the method before calling (having text_field as fallback). Making the specs pass using conditional Rails3 utility method (check for type url in Rails3 and text otherwise). Sending another pull as soon as i can figure out how to do rake specs with Rails 2.x environment. (Feel free to PM pointers to me). |
I'm struggling with Rails 2 specs right now too. Quite puzzled, will investigate. Anyway, in regards to the design decisions:
|
Do we really need rspec 1.2.x for Rails 2.x? Cant we spec Rails 2.x using rspec 2? |
Please have a look at the latest commits on my HTML5 branch. I think this should make it work in Rails 2. There are 2 commits, the last one changes it such that an error is raised if Rails does not respond to the helper. Also there is no auto-guessing on HTML5 fields in Rails2. Pull if you think they look satisfactory. Again, i'm sorry, i've not yet been successful in executing the spec under Rails 2 (but i predict they will pass when one is able to execute them, famous last words :D ). Do let me know how you went with running specs on Rails 2, anyway. |
Am looking into Rspec 2.0 for Rails 2.x right now. |
Okay, have a local branch which "runs" the specs under Rspec 2 with either Rails 2 or 3. All tests pass with a Rails 3 gemset, some fail under a Rails 2 gemset. Some of this is because of recent commits, some is a small mystery. Will review on the train and merge / push up whatever I have, because Rails 3 is passing. Looks like I'm ditching the Gemfile until we go Rails3-only in 2.0, but will confirm soon. |
Awesome, specs passing with both a Rails 2 or 3 gemset in master (had to ditch the Gemfile), ended up merging in both the "fallback" and "raise" solutions for Rails 2, then reverting the "raise", which I think is a better path forward. Leaving this open purely for CSS testing which I'll do. Thanks everyone! |
That's Legendary, Mr. French! |
replicate the styles on string-like fields to the newer HTML5 fields like email and URL, as needed to closed by a020620 |
Added styles in a020620, closing. Thanks everyone. |
Most (if not all) of the work done here:
http://github.com/asanghi/formtastic/commit/73e71b6d4104879369df3e7f29c101d5e338ce8c
The text was updated successfully, but these errors were encountered: