summaryrefslogtreecommitdiff
path: root/_posts/2010-07-06-singular-resourcing-on-rails-3-beta.html
blob: a06a9be1f9e414b10fe6a13339028b11f9ae202e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
layout: post
title: Singular resourcing on Rails 3 beta
tags:
- Development
status: publish
type: post
published: true
meta:
  _edit_last: '1'
---
Today I've been struggling on my project to be. I want to build it just right so I can learn Rails 3 the best way and enjoy the Ruby and Rails experience a little more. I love their ways, but sometimes it gets tough to go around the normal skeleton of an application.
<h3>Singular resourcing was harder to grasp than I thought</h3>
The idea is actually pretty simple to understand: for example, <em>you say you want a user to access only one resume</em> because that's the only one he would have. The scaffold generator adjusts the routing accordingly; well, at least it should.

<!--more-->

[gist id='464781']

It should actually be <code>resume_path</code> in the singular but for the URL's to work you must have an <code>:as</code> parameter in the routes:

[gist id='464784']

I got frustrated for realizing I had to do extra effort to understand something that should have been linear. I need to work around on this. I was thinking of normal resourcing the posts so it could be searchable later on and everything. But it doesn't feel right, that's not the business model. A user has its own resume, period. If he is to look at another one, then a custom route will be made up.

I'm asking for help now. If you have something to share regarding this matter, it would be absolutely great and I thank you very much.

PS: Yes, the application started from this point. I have no users yet, no static content, no nothing. Perhaps starting an application with a singleton scaffold was a bad idea. Perhaps start with the users first? After all, they are the system and the resume should belong to them.