Validate in a model using a controller def

OK…but then you would also expect other people to expect you to keep a log of how people's preferences should be, with you responding accordingly? That's unreasonable.

Actually, it doesn't.

What doesn't what?

[snip]
Arguing how people should post online is futile and simply an expression of someone's preferences.

Don't do it then, I wasn't arguing, just asking nicely.

Colin

Arguing how people should post online is futile and simply an expression of someone's preferences. That's it. It can be argued into the ground like it has in the past. Unless a list owner demands it, it's a topic that will never be solved.

Unless one realises that it's not "preference" it's "ignorance".

My preference is top posting because when I follow a thread, I don't have to start over every time I come back to the thread.

You say in another post that you can't be expected to recall
everyone's personal preference for type of reply, yet you seem to
imply here that you have no problem remembering all the contents of
every post in every thread you follow.

I personally don't like having to scroll down several pages to see someone else say "ya I've experienced that result as well". It's a waste of time, and my right hand isn't getting any younger every time I use that wheel.

Absolutely - those who "bottom post" without snipping are just as
ignorant than those that top-post. Neither group is taking any effort
to contribute to a conversation, they're just blurting out their
thoughts in one paragraph, and slapping 'send'.

Actually, it doesn't.

What doesn't what?

See, you failed to read the quotation on the bottom. It was referencing what was quoted down below. Many people don't like this format of interspersing. They find it highly confusing.

[snip]
Arguing how people should post online is futile and simply an expression of someone's preferences.

Don't do it then, I wasn't arguing, just asking nicely.

People discussing something where contrary opinions are at hand, are in somewhat of a debate. Presentations in such a debate are indeed arguments, and are not meant to convey angry diatribe. That's what I meant.

Arguing how people should post online is futile and simply an expression of someone's preferences. That's it. It can be argued into the ground like it has in the past. Unless a list owner demands it, it's a topic that will never be solved.

Unless one realises that it's not "preference" it's "ignorance".

Because you say so? Again, check the intensity of the google's hitlist I sent before.

My preference is top posting because when I follow a thread, I don't have to start over every time I come back to the thread.

You say in another post that you can't be expected to recall
everyone's personal preference for type of reply, yet you seem to
imply here that you have no problem remembering all the contents of
every post in every thread you follow.

If it's a quick thread, then yes indeed, I do remember the last several comments. Second, like I have said, I regularly quote below and top post. Keeping the thread as well is expected. Why do you think email applications have things like thread organization?

I personally don't like having to scroll down several pages to see someone else say "ya I've experienced that result as well". It's a waste of time, and my right hand isn't getting any younger every time I use that wheel.

Absolutely - those who "bottom post" without snipping are just as
ignorant than those that top-post. Neither group is taking any effort
to contribute to a conversation, they're just blurting out their
thoughts in one paragraph, and slapping 'send'.

Honestly, I think this is a dead topic. It's never going to go away. I just wanted to say that asking people to post a certain way is a bit much.

Actually, it doesn't.

What doesn't what?

See, you failed to read the quotation on the bottom. It was referencing what was quoted down below.

I'm sure you're trying to be interestingly ironic, but you're shooting
yourself in the foot a little. Yes, of course, it may be "preference"
to "quote" from references at the bottom; but normally in this
instance, it's common to put some form of indicator to the footnote
(such as a number in square-brackets, matched to another at the
reference). Just writing at the top and saying that everything you
write is referencing everything at the bottom is rather glib.

Many people don't like this format of interspersing. They find it highly confusing.

Many people find computer programming highly confusing... I'm not
going to stop encouraging them to get better at it...

Because you interspersed this one, it really was *much* easier to follow :wink:

Unless a list owner demands it, it's a topic that will never be solved.

Unless one realises that it's not "preference" it's "ignorance".

Because you say so? Again, check the intensity of the google's hitlist I sent before.

No, it just *is* ignorance, whether I say so out loud or sit quietly
in the wings. Lots of preferences are born out of ignorance; sure,
lots of people get very heated about this one, but if you cancel the
noise on all sides, top/bottom posted replies of any length cause
confusion, while interspersed replies offer an opportunity of
discussing like a "normal" conversation (yet may well still give rise
to some confusion on occasion).

Given the choice of loads of confusion, or little; I'll choose the lesser.

Why do you think email applications have things like thread organization?

As an attempt by developers to make up for poorly composed emails?

Honestly, I think this is a dead topic.

It's certainly kicking strongly.

I just wanted to say that asking people to post a certain way is a bit much.

But again; this is contradictory, because you're asking people *not*
to ask other people not to top post? (eek... triple-negative - never
good :wink:

Q: Why is top-posting such a bad thing?
Q: What is the most annoying thing in e-mail?

night all.

Actually, it doesn't.

What doesn't what?

See, you failed to read the quotation on the bottom. It was referencing what was quoted down below.

I'm sure you're trying to be interestingly ironic, but you're shooting
yourself in the foot a little. Yes, of course, it may be "preference"
to "quote" from references at the bottom; but normally in this
instance, it's common to put some form of indicator to the footnote
(such as a number in square-brackets, matched to another at the
reference). Just writing at the top and saying that everything you
write is referencing everything at the bottom is rather glib.

Well, you're just wrong then. I'm not trying to be ironic at all. I actually don't like hipsters.

And I disagree. I'm responding to what I am quoting. Hopefully what's quotes is what the current reply is commenting about. That's why one would quote something, as a reference. If not, why would it be quoted at all?

Many people don't like this format of interspersing. They find it highly confusing.

Many people find computer programming highly confusing... I'm not
going to stop encouraging them to get better at it…

Which is along the same lines as not expecting people to have people format emails the way you want them.

Because you interspersed this one, it really was *much* easier to follow :wink:

For you. Some people don't find it easier. :stuck_out_tongue:

Unless a list owner demands it, it's a topic that will never be solved.

Unless one realises that it's not "preference" it's "ignorance".

Because you say so? Again, check the intensity of the google's hitlist I sent before.

No, it just *is* ignorance, whether I say so out loud or sit quietly
in the wings. Lots of preferences are born out of ignorance; sure,
lots of people get very heated about this one, but if you cancel the
noise on all sides, top/bottom posted replies of any length cause
confusion, while interspersed replies offer an opportunity of
discussing like a "normal" conversation (yet may well still give rise
to some confusion on occasion).

See, it isn't about you. It's not ignorance because you say so. There's plenty of evidence that people argue about this well before you. And while I can appreciate your presentation of logic, it isn't the only way out there, and those alternatives are indeed brought up in other people's logic.

Given the choice of loads of confusion, or little; I'll choose the lesser.

For your expectations, sure. I don't mind it. THAT is my point.

Why do you think email applications have things like thread organization?

As an attempt by developers to make up for poorly composed emails?

So now it's a developers issue, and other people who simply do not know how to use email?

Honestly, I think this is a dead topic.

It's certainly kicking strongly.

It's dead because everybody expects everybody else to wrap around their own needs.

I just wanted to say that asking people to post a certain way is a bit much.

But again; this is contradictory, because you're asking people *not*
to ask other people not to top post? (eek... triple-negative - never
good :wink:

No, I'm saying don't bitch when people do things their way. Please, with all the ways this thread has been quoted and formatted, you still haven't read what I have put. I'm continuing to repeat myself here, and you still don't get it. Would you like a different font? Want me to explain it yet again? If anything, you're demonstrating that in any way shape or form, you still won't get it, and formatting has nothing to do with the effectiveness of a thread or a point.

What would be ultimately respectful to people is if they read the posts instead of expecting others to format properly.

Many people don't like this format of interspersing. They find it highly confusing.

Many people find computer programming highly confusing... I'm not
going to stop encouraging them to get better at it…

Which is along the same lines as not expecting people to have people format emails the way you want them.

I don't understand what you're saying here.

See, it isn't about you. It's not ignorance because you say so.

Given the choice of loads of confusion, or little; I'll choose the lesser.

For your expectations, sure. I don't mind it. THAT is my point.

I'm talking about the confusion upon *all* readers totalled together -
not just the confusion of an individual reader.
When lots of people read and reply with top or bottom posted email,
there's lots of confusion. When another lot read and reply with
interleaving, there's generally less confusion.

Why do you think email applications have things like thread organization?

As an attempt by developers to make up for poorly composed emails?

So now it's a developers issue, and other people who simply do not know how to use email?

I'm suggesting that the developers add the functionality of thread
organisation to attempt to compensate for the situation that has
resulted from people not being able to compose messages nicely.
I'm not implying that it's the developers' *fault* there's top-posting
(unless they're the developers of Outlook :wink:

I'm saying don't bitch when people do things their way... I'm continuing to repeat myself here, and you still don't get it.

And you don't seem to have "got it" either. No-one has "bitched". It
was suggested to a poster not to top-post, because the people (or at
least a large portion of them) that are attempting to help would find
it easier to help if their messages were composed differently.

So in this event, if the poster continues to abide by their
"preference", they're being deliberately ignorant of the simple
requests of the people that are most likely to help them. A little
courtesy goes a long way.

Would you like a different font? Want me to explain it yet again?

Now, now. It's all been very civil so far. If you want to veer toward
snide, I'll abstain.

What would be ultimately respectful to people is if they read the posts instead of expecting others to format properly.

So you agree... they're not formatting "properly" ATM? :wink:

I don't understand what you're saying here.
I'm talking about the confusion upon *all* readers totalled together -
not just the confusion of an individual reader.
When lots of people read and reply with top or bottom posted email,
there's lots of confusion. When another lot read and reply with
interleaving, there's generally less confusion. I'm suggesting that
the developers add the functionality of thread organisation to attempt
to compensate for the situation that has resulted from people not
being able to compose messages nicely.
I'm not implying that it's the developers' *fault* there's top-posting
(unless they're the developers of Outlook ;-)And you don't seem to
have "got it" either. No-one has "bitched". It was suggested to a
poster not to top-post, because the people (or at least a large
portion of them) that are attempting to help would find it easier to
help if their messages were composed differently.
So in this event, if the poster continues to abide by their
"preference", they're being deliberately ignorant of the simple
requests of the people that are most likely to help them. A little
courtesy goes a long way.
Now, now. It's all been very civil so far. If you want to veer toward
snide, I'll abstain.
So you agree... they're not formatting "properly" ATM? :wink:

(re-posted as a top-post as an experiment on the clarity of the format...)

Many people don't like this format of interspersing. They find it highly confusing.

Many people find computer programming highly confusing... I'm not
going to stop encouraging them to get better at it…

Which is along the same lines as not expecting people to have people format emails the way you want them.

I don't understand what you're saying here.

Three types of ways you can format a reply.

- top posting
- bottom posting
- interspersed

Having expectations of everybody else conforming to what you prefer, is going to shut down people's participation.

See, it isn't about you. It's not ignorance because you say so.

Given the choice of loads of confusion, or little; I'll choose the lesser.

For your expectations, sure. I don't mind it. THAT is my point.

I'm talking about the confusion upon *all* readers totalled together -
not just the confusion of an individual reader.
When lots of people read and reply with top or bottom posted email,
there's lots of confusion. When another lot read and reply with
interleaving, there's generally less confusion.

But that's the situation. You can only assume that with a list where there is nothing formally posted to instruct people, and with a population in a list that's healthy, that there are all three types of posters around.

Interleaving makes sense to you. Other people say top posting makes sense. Other people say bottom posting makes sense. Arguments all around. That's why it's a dead topic, because there is never a winner.

Why do you think email applications have things like thread organization?

As an attempt by developers to make up for poorly composed emails?

So now it's a developers issue, and other people who simply do not know how to use email?

I'm suggesting that the developers add the functionality of thread
organisation to attempt to compensate for the situation that has
resulted from people not being able to compose messages nicely.
I'm not implying that it's the developers' *fault* there's top-posting
(unless they're the developers of Outlook :wink:

You just insist that your preference is right.

I'm saying don't bitch when people do things their way... I'm continuing to repeat myself here, and you still don't get it.

And you don't seem to have "got it" either. No-one has "bitched". It
was suggested to a poster not to top-post, because the people (or at
least a large portion of them) that are attempting to help would find
it easier to help if their messages were composed differently.

And the response is that other people prefer other ways because they find it easier. Have you considered that?

So in this event, if the poster continues to abide by their
"preference", they're being deliberately ignorant of the simple
requests of the people that are most likely to help them. A little
courtesy goes a long way.=

…and then you continue to call them ignorant, because they don't agree with you. And you wonder why topics never progress.

And a reply to demonstrate how stupid a bottom post can look.

yes... I've agreed with that already...

Hehe, interspersed can get rather lengthy as well.

My preferences are top-posting and interspersed. I don't mind editing a good topic.

Many people find computer programming highly confusing... I'm not
going to stop encouraging them to get better at it…

Which is along the same lines as not expecting people to have people format emails the way you want them.

I don't understand what you're saying here.

Having expectations of everybody else conforming to what you prefer, is going to shut down people's participation.

Yes, but I specifically don't understand how "Which is along the same
lines as not expecting people to have people format emails the way you
want them" has any relation to with me saying that I'm not going to
stop helping people improve their coding where possible.
Don't worry though - it's probably not worth the distraction (unless
it was very important, in which case, please do clarify)

But that's the situation. You can only assume that with a list where there is nothing formally posted to instruct people, and with a population in a list that's healthy, that there are all three types of posters around.

I "assume" based on reading all the threads (and I read 'em all...),
and seeing the amount and quality of people who post in different
ways. Most of the requests are poorly written, most of the best
assistance is well written.

Interleaving makes sense to you. Other people say top posting makes sense.

Yes... people say all sorts of cr@p about all sorts of stuff. But not
everyone's opinion is worth the same. Look at the quality of posts
from people, and judge their "opinions" by that.

You just insist that your preference is right.

urm... no. I insist that the right way is what I prefer :wink:

And the response is that other people prefer other ways because they find it easier. Have you considered that?

I don't need to consider it - no-one has ever posted a response to a
reply here saying "please don't interleave your response, it's too
easy to see what line you're responding to". Why spend time
considering something which has never happened?

The only "easy" that top or bottom-posting-without-any-trimming is is
easy for the sender - because it's quick and lazy.

So in this event, if the poster continues to abide by their
"preference", they're being deliberately ignorant of the simple
requests of the people that are most likely to help them. A little
courtesy goes a long way.=

…and then you continue to call them ignorant, because they don't agree with you. And you wonder why topics never progress.

I'm calling their behaviour ignorant, and I've said they're
demonstrating ignorance - we can certainly all behave ignorantly from
time-to-time.

It's a good thing there's beer in the World.

> Actually, it doesn't.

What doesn't what?

Read the thread.

he was actually proving the point of why top posting is a problem while
trying to argue the opposite. He was answering my point which was
sandwiched down below.

Some people will never get it - probably because they don't want to.

Read the thread.

Craig

Read the thread.

Thanks for your reply and sorry for my late response =)

I'm using Typus, I know that theres a group for typus but I think that
this problem can happen everywhere

You are still being too vague about your requirement, for me anyway.
Can you write the validation test as pseudo code, being absolutely
clear about each reference there? Ignore everything about the meaning
of the database fields and just write the validation requirement in
terms of data in the database and the new data about to be saved,
referencing just database fields.

I have a view of evaluations

EVALUATIONS

Name View questions Add question
Math view add (edit)
Science view add (edit)

EVALUATION : Math
QUESTIONS

Number View alternatives Add alt.
1 view add (edit)
2 view add (edit)
3 view add (edit)

with
validates_uniqueness_of :qnumber, :scope => :evaluation_id

I made that there's only one question number "1" on each evaluation
the only problem that I have (as I mentioned before) is that, when I
edit the second question (# 2)
and I change its content, it doesn't let me to do it, because they
found that the number (# 2) has been already taken

The other problem is what happens if I want to edit
the second question (# 2) and I change the number to (# 3)
with that validation it let me do that, but what if I edit the second
question (#2)
and I put (#1).... there will be two questions with the same number
(#1)

I was searching for a validation for it, I've been reading the
validation guide and found section 15 about
Proc.new.... it could help but I don't understand it well (I'm really
new with rails)

JavierQQ, try this:

validates :qnumber, :uniqueness => \{ :scope => :evaluation\_id,
    :message => "must be unique within each evaluation" \}

in the model, and let us know what happens. Don't worry about what
controller it's going through to get there.

-Dave

It works! ... well as far as I tested :), thanks a lot

I've been reading the messages about top-posting and I'm really really
sorry about any trouble I could have caused
Thanks a lot Colin for keep on trying to help me, I'll follow your
advice about how to post something

I think perhaps I was being too subtle :slight_smile:
I will find a larger sledgehammer next time.

Colin

I reiterate: if you change the subject, change the Subject!

In case my subtlety is lost on you, lemme 'splain: if you start
writing about something other than what the conversation was
originally about, take a few seconds to change the Subject line of the
message. (Or if you're writing directly on a web forum, it may be
called the Title, or Re, or something else, but still you probably
understand what I mean.)

Because certain people didn't do that (even though *I did* and thereby
created a perfectly good thread in which to sidetrack the nonsense),
we've now got all this repetitive dead-horse-beating about
top/bottom/interspersed posting, polluting the thread in which
JavierQQ was actually trying to get some help, and *some* of us were
actually trying to help him. Making him, and the rest of us, wade
through it (if at this point anybody but the post-order zealots is
still reading this), is even MORE anti-productive, than whatever
posting-placement you might think is most wrong.

Think of it like a poorly named variable, method, or class. We see
the subject line (go take a moment to look at it!), and expect it to
be something about RoR validations, models, and controller defs,
whatever those are. But instead we find the same old crap people have
been arguing about for literally decades, about top posting. Like if
Rails gives you a stack trace that says that you have an error in your
method Category::rename_to_standard, and you find it has nothing to do
with categories, naming, or standards, but does something utterly
unrelated like maybe calculating a ballistic trajectory (and the whole
application had nothing to do with ballistics), as part of an
Easter-egg game that some overly clever but underly supervised bored
programmer decided to stick into some gem you're using.

Yes I know that by posting this message I am contributing to said
noise -- but as my high school calculus teacher said, sometime you've
got to make something uglier before you can make it pretty.

NOW GET IT THE FSCK OUT OF HERE! :stuck_out_tongue:

-Dave