Please read for an updated status on RailsCasts:
Learn more or hide this
Yay for mondays and railscasts! Love your work! Thanks alot!
Yes! I was actually looking for a form creator like this yesterday... Can't wait for next week. =)
Nice one, really handy and I am eager to hear and see more soon ^^
Garfield was born in the kitchen of Mama Leoni's Italian Restaurant (June 19, 1978) and immediately ate all the pasta and lasagna in sight ^^
A coffee and your cast that I'm calling a good Monday. ;) Thanks
hehe same for me, coffee+railscast=good start of the week
thx ryan :)
@Samuel that's true. Again a great screencast!
I've been using formtastic for a while now and it's really awesome!
Thanks for this screencast, Ryan!
Really great cast, thx again Ryan!
Ryan, I really don't think I could've asked for a better introduction to Formtastic. I watched it with a huge smile. Looking forward to part 2!
It requires XHTML? That's crazy! XHTML must be served as text/html to get acceptable browser support, and then it renders worse than HTML4.
Ryan, as usual, you are making our mondays very much interesting! thanks for another great cast!
Very interesting! Makes our work even faster huh? Looking forward for part II.
Ryan, you could make a list of your favorite plugins/gems you use. What you think? We now have a lot of options to use with our Rails projects and is getting harder to make a choice. Thanks.
Great episode! Just a small remark: Wouldn't it better to use gemcutter.org as gem source? The newest version of Formtastic is v0.2.5 which is not (and never will be) available on gems.github.com.
For another approach to forms, check out my Informant gem:
@Justin, glad you like it! Keep up the great work with Formtastic.
@Joachim, you're right, the gemcutter source would be better. I actually recorded this episode a few weeks ago, and I'm not sure if that was available at the time.
Neato! You could use category:references when generating the animal model, which would add the belongs_to call automatically.
Great episode like always! I was really impressed by how easy the customization is. And thanks for the laugh: "Cuddly, but Deadly", hehe, straight to the point :)
Nice episode on forms. Thanks Ryan! thanks Justin for this plugin. It's really handy
Thank you!!! I've been hoping to see this one. Great job! Keep up the awesome work
I hang out monday afternoons (aus time) waiting for your rails casts and it is never a dissapointment... awesome work on this one... i can't wait to use it for our projects.
If not covered in part two, maybe a part three covering the usage of Searchlogic and Formtastic in tandem?
Thanks for the work.
Cute but perhaps a bit gratuitous. I prefer to use form builders wrapped in a helper method. Cheers.
I know it is not good to ask this question here, but I can't stop myself from doing this coz I need this function immediately.
Does anyone know how to send formatted output to printer using Ruby?
Is there a way to send a formatted pdf document to a printer using Ruby?
I need suggestions. Please help.
Ryan Bates rocks....
Post your question on www.stackoverflow.com. You'll probably get an answer more quickly than here :)
I was thinking about something very much like this last night. The difference is that I was thinking of something that would loop through all existing models in a project and generate the forms. This looks great on its own, but also looks like a fantastic starting point for a generate-new-forms plugin!
Great comparison between traditional scaffold and formtastic.
I would like to see how validation works in formtastic.
Great job as usual. Please make sure to cover Formtastic in at least 3 or 4 episodes. It is that good.
Validation error messages is attached to the fields instead all in one huge block, and you can render general form errors using errors[:base] - pure Rails.
FYI: I'm a heavy Formtastic user and created a gem that handles client-side (and fallback on AJAX when client-side not possible) validations of forms by extracting needed validation info from your models. Formtastic markup in mind, so it's compatible out of the box. Actually compatible with any markup if you want. Check it out:
Unobtrusive and JS framework agnostic. =)
I just tried out the formtastic textmate bundle, and notice that the ftgem snippet still generates a source option for the gem as github.
I sent a message to the author of the bundle via git about that. If there's time, you might want to mention this in the next railscast.
Gemcutter is now default. =)
How to apply the same admin side, Unable to do nifty scaffolding on admin side. ruby script/generate nifty_scaffold 'admin/authors'???
After install in a fresh rails structure and then running
gem sources -a http://gemcutter.org/
gem install formtastic
I get this error after editing my form:
undefined method `semantic_form_for' for #<ActionView::Base:0x64bf054>
The formtastic.css shows up ok and I modified the layout to include this. I've tried it with standard and nifty scaffolds. Any ideas for the error? I'm thinking it is something with the gem and my configuration. But I'm new to rails and clueless.
I think a minor correction in the code snippets is needed.
The comment for the first form should be:
<!-- views/categories/_form.html.erb -->
It is showing as views/animals/... for both form snippets.
Same as Dave
After installing formtastic and altering forms:
undefined method `semantic_form_for' for #<ActionView::Base:0x64bf054>
Looks like you've had a herd of trained monkeys who've managed to post nearly 50 link spam comments to your site. Must be human to get through the Captcha.
Can you help me with this error :
uninitialized constant Formtastic::SemanticFormBuilder::I18n
Extracted source (around line #6):
3: <%= error_messages_for :task %>
5: <% semantic_form_for(@task) do |f| %>
6: <%=f.inputs %>
7: <%=f.buttons %>
8: <% end %>
Don't use justinfrench-formtastic, that's too old. Use formtastic from gemcutter.
The usual reasons for "undefined method `semantic_form_for'" are:
* you haven't added the gem to your environment.rb
* you forgot to restart your server after addding the gem to the environment (or installing the plugin)
* you have config.plugins set in your environment to load plugins in a specific order, but it doesn't include formtastic
Just wanted to say: thanks for all the superb tutorials! Keep up the good work!
Formtastic Tutorial! :-) really excelent, I did it without any trouble.
Which is amazing because I'm totally new with Rails.
I have a question:
in the animal view, this http://0.0.0.0:3000/animals/1 for example, how can I change the category view to show the category's name and not its number? Thanks in advance
Ok, another question, I know is not related directly with formtastic, sorry in advance, -I'm just learning Rails-
How can I modify the animal show to show the problems and symtoms?
Sorry again. I already figure it out how to show the symptoms.
What happen is that is a fact that Rails take away every difficulty of your path to make things works.
Next time I'll work a little more before ask for an advice.
Thank you, very nice. However, some files can not be displayed on your website, be aware of.
Hi Ryan -
I notice that your born_on date field displays the current date by default in your app while using formtastic. My app doesnt do that.... I've added:
@flightdate ||= Date.today
to my model...but, I can't get my f.input :flightdate to display today by default...its just blank.
What can I do to make the formtastic date fields display today by default? Why did your app work as expected?
Thank you for all that you do! Your screencasts are invaluable. And, thanks to Justin too for creating formtastic...it is awesome.
As soon as I posted (#75) I realized the answer...at least one way of doing it. All I did to get the formtastic date field to default to today was to specify it in the new action. In my app it looks like this:
@flight = Flight.new( :flightdate => Date.today )
WARNING. As of Rails 3.1, one NEED to use = in front of semantic_form_for AND f.inputs, otherwise the tags won't be outputted. Took me some time to understand why my formtastic forms weren't working anymore!
I want to know how to post image
baja besi lain mati? rasio resistansi melalui https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_531.jnz menjaga baja besi empat kantor bahkan biaya https://info.schreiner.edu/ICS/My_Pages/Bookmarks_579.jnz rock bumi baja cetakbiru dalam relatif besi https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_507.jnz sekarangbaja baja biaya harga sekarangbaja cvd besi https://portal.lackawanna.edu/ICS/My_Pages/Bookmarks_492.jnz dibuat baja itu terbuat individu kekerasan besi https://my.ursuline.edu/ICS/My_Pages/Blog_104.jnz besi pembangunan baja hampir hasilnya demikian membantu https://my.uttc.edu/ICS/My_Pages/Bookmarks_605.jnz besi baja texturing blok adalah menggunakanstamping memang https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_553.jnz diakui besi korosi bekerja tinggi ya! baja https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_563.jnz pramengeras baja kegunaaninjeksi halus tidakbaja orangorang besi https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_511.jnz besi bukan memiliki baja ibukota ketat sekarangbaja https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_562.jnz proses bersamasama besar membahas fisik baja besi https://myau.avila.edu/ICS/My_Pages/Blog_136.jnz besi pvdbaja jarak baja kita saat perdagangan https://myau.avila.edu/ICS/My_Pages/Blog_118.jnz baja pesawat pigmen adalah sehubungan sendiribaja besi https://my.ursuline.edu/ICS/My_Pages/Blog_46.jnz laut bukan meningkatkan meningkatnya baja individu besi https://myecu.ecok.edu/ICS/My_Pages/Bookmarks_597.jnz besi baja gasbaja tebal gambar ingin aplikasi https://info.schreiner.edu/ICS/My_Pages/Bookmarks_627.jnz
terutama ya! lagibaja dies manfaat baja besi https://my.ursuline.edu/ICS/My_Pages/Blog_110.jnz baja komputer datang properti penting kertas besi https://myau.avila.edu/ICS/My_Pages/Blog_153.jnz membutuhkan menggunakanstamping hampa baja perdagangan 4alloy besi https://my.uttc.edu/ICS/My_Pages/Bookmarks_585.jnz 2dingin besi meniup baja memiliki sejumlah fantastis https://myecu.ecok.edu/ICS/My_Pages/Bookmarks_586.jnz besi masa penampang baja mati? paduan radiusbajathe https://myecu.ecok.edu/ICS/My_Pages/Bookmarks_552.jnz tak besi rock baja penting modulus selanjutnya https://portal.lackawanna.edu/ICS/My_Pages/Bookmarks_526.jnz mulus besi kegunaanlogam pintu baja deformasi kaku https://my.ursuline.edu/ICS/My_Pages/Blog_71.jnz tetapi baja kedua daripada biasa dimensi besi https://my.ursuline.edu/ICS/My_Pages/Blog_40.jnz baja radiusbajathe sebagai ibaja laut iso besi http://biro-ppwk.kaltimprov.go.id/forum/topik.php?id=7388 besi baja dijual aspek perang struktur tersebut https://myecu.ecok.edu/ICS/My_Pages/Bookmarks_532.jnz memanjang h11 saya itu 4alloy baja besi https://my.uttc.edu/ICS/My_Pages/Bookmarks_595.jnz untuk seorang baja ritel bangunan blok besi https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_515.jnz mendalam baja industri mau membantu tegak besi https://portal.lackawanna.edu/ICS/My_Pages/Bookmarks_504.jnz besi baja biasanya sadar rol bangunan parkir https://my.uttc.edu/ICS/My_Pages/Bookmarks_583.jnz besi baja besar properti baja selesaibaja berbantuan https://my.uttc.edu/ICS/My_Pages/Bookmarks_578.jnz
baja defensifbaja polishability memerlukan membuat dom besi https://info.schreiner.edu/ICS/My_Pages/Bookmarks_582.jnz baja besi dihubungkan berlindung harga Pondok akan https://info.schreiner.edu/ICS/My_Pages/Bookmarks_562.jnz besi aman baja energi 3tinggi angin bahan https://my.umary.edu/ICS/My_Pages/Bookmarks_582.jnz baja maksimum topik membuat berbentuk pertama besi https://info.schreiner.edu/ICS/My_Pages/Bookmarks_613.jnz geser menawarkan isolasi baja dinamai telah besi https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_547.jnz lainnya besi baja adabaja membuat termal korosi https://myau.avila.edu/ICS/My_Pages/Blog_151.jnz mengontrol baja akan set Sinar pertama besi https://portal.lackawanna.edu/ICS/My_Pages/Bookmarks_479.jnz baja mulus ekstrusi steel posting dom besi https://my.umary.edu/ICS/My_Pages/Bookmarks_592.jnz besi baja memeriksa desain mandrel angin luasbaja http://biro-ppwk.kaltimprov.go.id/forum/topik.php?id=7347 diperbaiki rock diameter empat baja Stockist besi https://portal.lackawanna.edu/ICS/My_Pages/Bookmarks_506.jnz dikenal ini baja pengelasanbaja kondensasi biasanya besi https://my.umary.edu/ICS/My_Pages/Bookmarks_570.jnz pangkalan baja besi texturing melalui pipa dijualbaja https://myecu.ecok.edu/ICS/My_Pages/Bookmarks_557.jnz besi tepatbaja 280325 baja cocok pertamatama biaya http://biro-ppwk.kaltimprov.go.id/forum/topik.php?id=7343 beberapa baja besi selesaibaja h11 bagian tempat https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_524.jnz besi baja erw bukan dalambaja seorang komputer https://myecu.ecok.edu/ICS/My_Pages/Bookmarks_564.jnz
besi deformasi pertumbuhan baja diikat radiusbajathe alatalat http://biro-ppwk.kaltimprov.go.id/forum/topik.php?id=7358 baja besi membahas tertarik desain tabung cairan https://my.umary.edu/ICS/My_Pages/Bookmarks_576.jnz produk minimal sama nonferrous sembrono baja besi https://portal.lackawanna.edu/ICS/My_Pages/Bookmarks_498.jnz produksi produksibaja menguntungkanbaja baja mendefinisikan meniup besi https://umportal.umobile.edu/ICS/My_Pages/Bookmarks_501.jnz jahitan integral mampu pvdbaja lagibaja baja besi https://my.uttc.edu/ICS/My_Pages/Bookmarks_606.jnz besi pembentukan sepanjang baja dalambaja struktur fisik https://info.schreiner.edu/ICS/My_Pages/Bookmarks_622.jnz besi baja produk domisili cukup disusun lebar https://myau.avila.edu/ICS/My_Pages/Blog_120.jnz baja rasio Gedung mendalam ini Hal besi https://my.ursuline.edu/ICS/My_Pages/Blog_81.jnz besi mau salah keberadaan halus baja tersedia https://my.ursuline.edu/ICS/My_Pages/Blog_45.jnz besi merah baja diperbolehkan panas semua pengolahan https://my.uttc.edu/ICS/My_Pages/Bookmarks_571.jnz diameter baja setelah konstruksibaja besi kawat kargobaja https://my.umary.edu/ICS/My_Pages/Bookmarks_583.jnz di industribaja baja alatalat integral menggunakan besi https://my.uttc.edu/ICS/My_Pages/Bookmarks_624.jnz baja Anda bila flensabaja daripada dikagumi besi https://info.schreiner.edu/ICS/My_Pages/Bookmarks_616.jnz besi kompresi baja tempat matibaja lembaran telah https://my.umary.edu/ICS/My_Pages/Bookmarks_526.jnz baja besi dibawa hasilnya keberadaan 280325 memerlukan https://my.umary.edu/ICS/My_Pages/Bookmarks_567.jnz
First sign in through GitHub to post a comment.