Hi ,
I have created an array of hashes using
Model file class
Class A ActiveRecord::Base
def fill_paths
paths = Array.new
for file in @files
path = {}
path[a] = file
path[b] = DATA2(assume data2 is valid)
paths path
end
return paths
end
in controller class
On 5 Jun 2012, at 18:58, cyber c. li...@ruby-forum.com wrote:
Hi ,
I have created an array of hashes using
Model file class
Class A ActiveRecord::Base
def fill_paths
paths = Array.new
for file in @files
path = {}
path[a] = file
path[b] = DATA2(assume data2
**this is the error:
undefined method `to_i' for [5]:Array
**this is the code:
sql = ActiveRecord::Base.connection();
@loo = sql.execute(select count(name) from data1.items).fetch_row;
@loo = @loo.to_i
Plz help; it is urgent.
regards,
INDRANIL MUKHERJEE
--
You received this message
@loo = @loo.first.to_i
On Wed, Nov 18, 2009 at 6:26 PM, INDRANIL MUKHERJEE
indranil.sinc...@gmail.com wrote:
**this is the error:
undefined method `to_i' for [5]:Array
**this is the code:
sql = ActiveRecord::Base.connection();
@loo = sql.execute(select count(name) from
I have two action in the same controller:
def list
if logged_in?
sort = case params['sort']
when title then title
when a then a
when b then b
when c then c
when title_reverse then title DESC
when a_reverse then a DESC
5 matches
Mail list logo