I'd like to format a column with numbers with a decimal point. In my body text I use old-style figures for numbers, and lining figures in equations. If I use dcolumn my tables use lining figures, instead of old-style figures.

I've fiddled around with the definitions in dcolumn.sty already, but it seems to rely on math mode to get the dot 'right', so removing all the $-characters leads to breakage.
Temporarily changing the math font to use old-style figures seems to be a pretty difficult thing as well, this is all set up during the loading of the font package...

Using siunitx with \sisetup{mode=text} I do get old-style figures, but then \figureversion{tab}, which I use to switch to tabular figures, is ignored, and the figures also don't line up nicely.

Does anyone have a good suggestion to either use dcolumn in non-math mode, or to get siunitx to use old-style tabular figures?

A minimal example, using siunitx:

\documentclass{standalone}
\usepackage[mathlf]{MinionPro}
\usepackage{siunitx}
\sisetup{mode=text}
\begin{document}
{\figureversion{tab}
  \begin{tabular}{SSS[table-format=4.1]}
    {A wide heading} &amp; $x$ &amp; {more data} \\
    14.1 &amp; 14.1 &amp; 1111.1 \\
    1.674 &amp; 1.671 &amp; 4882.8 \\
  \end{tabular}}
\end{document}



Question: Scope and SQL query in Rails 4
Answer: I believe scope is just an alias, so its also possible to do it like this

def self.by_name (name)
   where('name LIKE ?', "%#{name}")
end