1. I build http://SOME.example.com and http://OTHER.example.com on the
server SOME.example.com.
useing nginx unicorn RoR Device
2. For the clone, http://SOME_CLONE.example.com and
http://OTHER_CLONE.example.com are builed on the server
SOME_CLONE.example.com
3. Only SOME.example.com is
is this fit for your purpose ?
def my_select(array,str)
array.select{ |sub_array| %r(#{str})=~ sub_array.join}
end
def another_select(array,str)
array.select{ |sub_array| %r(#{str})=~ sub_array.first.to_s}
end
my_array = [[1,2],[11,2],[23,89]]
while str = gets
p
Thank you, I got it.
2015年1月20日火曜日 5時55分31秒 UTC+9 Daniel Loureiro:
Try this:
Sola::Dayly.group(:month).maximum(:peak_kw)
*Explanation:*
find_by_sql is to be used to get real records, not database
calculations. The Group, Max and other statements produce calculations,
not real
When I tried on mysql
select max(peak_kw) peak,month from sola_daylies group by month;
It returns as I expected
+++
| peak | month |
+++
| 0.2126 | 2014-12-01 |
| 1.6156 | 2015-01-01 |
+++
on rails console,
4 matches
Mail list logo