"

To be more specific: I merge the edit, show and new actions into one.

"
Well just refrain from the urge to compact controllers code to the point of
having unreadable, and most importantly, intertwined code (even for
yourself, when you come back to that piece of code in a year). STICK to
REST. Use redirects or explicit template rendering from a REST action, but
NEW is NEW, and CREATE is CREATE. Abstract the same code into
private/protected methods. Eventually you'll come to an implementation that
both looks awesome and is well structured, and easy to change (for instance
let's say you want to put 1 extra computation or whatnot into your NEW
action, but only that (i.e. not CREATE). Then you got to rethink many
actions and test them, branch logic and end with ugly code just 1 thinko
from breaking the app. This is totally unnecessary work you are doing, and
I guess you've realized that because you are asking these questions.

I also suggest you diving into RSpec and BDD right off. Don't just 'try' it
for a few hours, cause then you will probably just drop it. It takes
practice to make it extremely useful; at first things go slow, but it pays
out in the long run when you have 1000 specs describing behavior and you
don't even have to test stuff while developing, and test for Complete a
(simple) project with BDD style. Or just at least write a spec for every
bug you encounter while developing the project. You'll soon enough witness
the benefits for yourself.

P.S. Some specs, especially view (template) specs seems like an overkill,
but it is key for a reliable development IMO. Probably no need for a spec
if you are presented with HTML mock, but I am talking about situations when
you just have a mental image of what user would see. Then you describe it
in specs. And while doing so you'll often identify weak points of your UI.

2012/7/18 Victor Goff <keeperotphones@gmail.com>
I couldn't help but notice your message on the list.

You don't have to have a mentor necessarily in your area. I have been
teaching and mentoring Ruby since 2008, and doing it all from remote.

Now that Google Plus has hangouts that let you share a terminal easily,
and voice and video and full desktop sharing if it is needed, along with
DropBox, you can pair program and share code and do all of those things
that you can do at a desk.

There are other options besides those of course, one of which is screen on
Linux or Mac, and potentially on Windows as well.

So please don't let that stop you.

By the way, I am a mentor at RubyLearning.org you may have seen our blog
at http://rubylearning.com/blog and our study notes at
http://rubylearning.com

Unfortunately, I don't know Rails. But Ruby we can help you with.
Warmest Regards,

Victor H. Goff III
維克多
My GPlus Profile <http://bit.ly/rqK71A>
Voice (307) 215-9107



On Wed, Jul 18, 2012 at 6:33 AM, pw wrote:

Thank you for your reply, I do realize the open-ended nature of the
question,
thought I should give it a shot anyway.

I love the suggestion of a mentor, unfortunately there are no Rails or
even Ruby groups
in my area.

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/TM8IYT8Z2TkJ.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Pagarbiai,
Gintautas

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJul 16, '12 at 8:39a
activeJul 18, '12 at 11:31a
posts6
users5
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase