Ruby on Rails Monday, August 30, 2010

On 30 August 2010 18:02, Marnen Laibow-Koser <lists@ruby-forum.com> wrote:
> Colin Law wrote:
>> On 30 August 2010 16:44, Chris Mear <chrismear@gmail.com> wrote:
>>>>> much more complex tasks but my mind seems to have gone blank and
>>> http://dev.w3.org/html5/spec/Overview.html#the-b-element
>>>
>>> Everything old is new again.
>>
>> Though actually I think my use case is not such as described there, it
>> being a list of column names (bold) and values, generated by a Rails
>> scaffold some years ago.
>
> Then you absolutely should not be using <b>.  Use something semantic
> instead, or if your design supports it, recast the whole thing into a
> <table> and use <th> and <td> (which is what I'd normally do).  The
> semantics are tabular, so a <table> element would be quite appropriate.

As I said before, I agree entirely. But as I also said before it is a
little used admin page and so improving the aesthetics of the html is
not the most important job at the moment.

Colin

--
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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Bill Walton wrote:
> On Mon, Aug 30, 2010 at 2:19 PM, Robert Walker <lists@ruby-forum.com>
> wrote:
>>>>
>>>> +1.  If only marnen were in charge....  ;-)
>>>
>>> The HTML 5 spec itself says <b> is only to be used as a last resort if
>>> no other element is more appropriate.  IMHO, that's never the case: even
>>> if nothing more specific can be found, <span> is more appropriate than
>>> <b>.
>>
>> I have to agree with Marnen. Are we criticizing people for emphasizing
>> exactly what the HTML5 spec states now?
>
> Speaking for myself, I am criticizing marnen's obnoxious and
> judgmental posts.

I didn't intend to be obnoxious. I *did* intend to be judgmental of bad
practice.

> A post such as yours that takes the time to explain
> to a poster why one approach is favored over another is welcome,
> "that's bad" is simply an unsubstantiated opinion.

I explained my rationale in an earlier post. You appatently neither
read it nor asked for the clarification which I would have been happy to
reiterate if requested. This is not the first time that you've taken me
to task for supposedly failing to provide information that I in fact
provided.

Legitimate criticism is welcome. But if you can't bother to check that
the criticism is borne out by the facts, then please don't bother to
post it.

> If he's not going
> to provide assistance, he should either keep his mouth shut or be
> ready to be chastised / derided in the same manner he treats others.

I provide lots of assistance, and regularly get thanked for it. If
you're going to criticize something about my posts, please make sure the
criticism actually applies. In this case, your stated criticism was
simply inaccurate.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org

Sent from my iPhone
--
Posted via http://www.ruby-forum.com/.

--
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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On 30 August 2010 18:01, Ithelp Eighty-five <lists@ruby-forum.com> wrote:
> Hello everyone I have a problem in my app with the validation on
> numericality. The field should be all numbers, and if an user types for
> example "12345abc" into the field an error is raised and the data is not
> saved. But in the field where the error was raised it now says "12345",
> I want this field to be blank instead.

In the update and/or create action, after the failed save, just blank
the field in the object being passed to the view. So if the object is
@my_thing and the field is value then set @my_thing.value = "" or
possibly nil might be better.

Colin

--
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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.