John Magee

Joined

70 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Accepts_nested_attributes vs the regular way.

So I've spent the last couple days working with accepts_nested_attributes_for in an effort to understand them (I've never used them before). I've used a variety of sources (GoRails video of course is one of them) and even did some funky stuff where I used fields_for via the show view of the parent. I created a custom route to submit the form so I could get the nested validation errors if they existed. And, for the heck of it I kind of figured out how to do it with AJAX (though, getting flash & errors through AJAX to display seems a bit of a conundrum)

Anyway, I've been thinking about it, and I'm just curious as to how much of an advantage accepts_nested_attributes_for (which I call ANAF to save characters on Twitter ;) ) is over the standard <%= form_for [@parent, @parent.children.new] do |f| %> method. I mean are they used in conjunction depending on your need, or do you only use ANAF for stuff you'd only want worked on on the pages that display the parent form?

(And oh yeah, is there any difference between .build and .new?

Posted in Integrating a blog within a Rails app.

How complicated do they want the blog to be? You could create something pretty simply using a WYSIWYG gem (there are a couple good ones) for content.

Is it a blog engine or is it a cms engine?

Posted in CMS in Rails

Most start up tutorials are blogs, but not blog engines, and they're very very primitive.

If you want a 'non blog' tutorial - check out Mannings Rails in Action, they build a project / task tracker type thing

I'd be interested if people wanted to build an engine like thing to go after WordPress

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.