[Rails] Re: small doubt HELP me

2009-02-05 Thread Shankar Ganesh
Ya thanks for your post, hope it will be helpful. -- 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 rubyonrai

[Rails] Re: small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Can you explain with a bit of code, It will be helpful for me apologizes I'm newbie to ROR and I'm a PHP developer.I would like to develop calendar using ROR when I am ti display the events I got struck here. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~--

[Rails] Re: small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Hello, This is not as regular we do for all tables.Look at the table you can see two fields 'when' and 'to'. What I need is #1 must find the range of dates between 'when' and 'to' fields, #2 Then I must fill the value for each date with the corresponding values. #3 Should make an array wit

[Rails] Re: small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Ram, Thanks for your help dude.Yes, I would like to have the output in the 'view' and the value should be fetched based on 'when' and 'to' fields. cheers, shankar. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message be

[Rails] Re: Help convert code form PHP to Rails.

2009-02-04 Thread Shankar Ganesh
The value for the corresponding date range is not inserting appropriately. I shall give an example here, consider : for 'id' as 1, date of 'when' as 2009-02-01,date of 'to' 2009-02-15,'what' as test date between days ! and 'color' as #DD5511 for 'id' as 2, date of 'when' as 2009-02-02,da

[Rails] Re: Help convert code form PHP to Rails.

2009-02-04 Thread Shankar Ganesh
Hi Julian, Here is what the code I tried <% result=[]%> <%date=[] %> ## An array from database with select all query <% @eventall.each do |test| %> <%i1= test.when%> <%i2 =test.to%> <%i3=i1.to_s.gsub('-','') %> <%i4=i2.to_s.gsub('-','')%> <%span =i3..i4%>

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Shankar Ganesh
Steve can you tell me when you are getting error and what error? -- 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 ema

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Shankar Ganesh
Steve, Have you tried this url(http://blog.invisible.ch/files/rails-reference-1.1.html#htmlforms . ) ? shankar. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Ra

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Shankar Ganesh
Hi Steve! Try this <%= form_tag :action => 'my_action', :id =>'xyz' %> and I think this manual will be helpful to you.http://blog.invisible.ch/files/rails-reference-1.1.html#htmlforms . enjoy ! have a great day. cheers, shankar. -- Posted via http://www.ruby-forum.com/. --~--~-

[Rails] Re: small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Hi all, My apologies for posting a small amount of data, there was some mistake in posting this post.You can see the full post of the forum here http://www.ruby-forum.com/topic/177617#777504. Thanks for all your response. Cheers, Shankar. -- Posted via http://www.ruby-forum.com/. --~--

[Rails] Help convert code form PHP to Rails.

2009-02-04 Thread Shankar Ganesh
hi, Shown below is the PHP code to obtain the value for each date in the corresponding date range.And with I've attached the MYSQL Database Table.Please Have a look.I've tried to convert this code to rails but not yet succeeded.Please let me know if you can do $value) { $group[$key].=$

[Rails] Values should be filled for corresponding date, in a range.

2009-02-04 Thread Shankar Ganesh
Hi , I'm newbie to Rails can someone help in this.I had struck here in my application and actually i solved it using PHP but don't know how to do in Rails. I have table like this --- |id | what | when | color |

[Rails] Fetching values from Table - Need help

2009-02-04 Thread Shankar Ganesh
Hi , I have table like this --- |id | what | when | color | to | description | --- |1 | test |2009-02-01 | red|2009-02-15 |yyy

[Rails] small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Hi , I have table like this --- |id | what | when | color | to | description | --- |1 | test |2009-02-01 | red|2009-02-15 |yyy

[Rails] small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Hi , I have table like this --- |id | what | when | color | to | description | --- 1 | test |2009-02-01 | red|2009-02-15 | hi this is test

[Rails] Re: Date Range Between Two Dates - NEED HELP

2009-02-03 Thread Shankar Ganesh
Julian Leviston wrote: > You can use Date ranges. If you have strings, you'll need to Parsedate > them into dates first. String ranges won't understand date overflow > (ie how many days in a month, months in a year etc.). > > ((1.year.ago.to_date)..(Date.today)).to_a.map{|x| x.to_s(:db)} > > Jul

[Rails] Date Range Between Two Dates - NEED HELP

2009-02-03 Thread Shankar Ganesh
hi, I've two dates say input for example., date1 = '2009-01-02'; date2 = '2009-01-10'; Need to find date range array between date1 and date2. output for example., Array{ [0]=>'2009-01-02', [1]=>'2009-01-03', [2]=>'2009-01-04', [3]=>'2009-01-05', [4]

[Rails] Re: Any one help

2009-01-28 Thread Shankar Ganesh
Is it possible to get using cycle method?? Rob Zolkos wrote: > Hi Shankar, > > Have a look at the api documentation for the cycle method > > http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M001551 > > Thanks, > Rob -- Posted via http://www.ruby-forum.com/. --~--~-

[Rails] Any one help

2009-01-28 Thread Shankar Ganesh
--- id | what | when | color | to | description | --- 1 | test |01/01/2009 | red|04/01/2009 | hi this is test |

[Rails] Re: Merging array with same key - HELP

2009-01-27 Thread Shankar Ganesh
all the records should be included. Julian Leviston wrote: > Which record do you want to include for the repeated dates? the first, > or last? > > Julian > > http://sensei.zenunit.com/ > http://random8.zenunit.com/ -- Posted via http://www.ruby-forum.com/. --~--~-~--~~--

[Rails] Re: Merging array with same key - HELP

2009-01-27 Thread Shankar Ganesh
Hi, I got a table like this --- id | what | when | color | to | description | --- 1 | test |01/01/2009 | red|04/01/2009 | hi this is test | --

[Rails] Re: Merging array with same key - HELP

2009-01-27 Thread Shankar Ganesh
Hi, I got a table like this -- 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@googlegr

[Rails] Re: Merging array with same key - HELP

2009-01-27 Thread Shankar Ganesh
01/2009"=>"1stjan1-1stjan2-1stjan3", > "10/01/2009"=>"10thjan1-10thjan2"} > > Enjoy, > > -Harold > On Jan 27, 2:13�am, Shankar Ganesh -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You rec

[Rails] Re: Merging array with same key - HELP

2009-01-27 Thread Shankar Ganesh
hjan2"=>"10/01/2009", "1stjan3"=>"01/01/2009"} anton effendi wrote: > make sure. > array1 --> date > array2 --> the value... > > or > array3 = {} > array1.each_with_index do |x, i| > array3[x] = array2[i] > end

[Rails] Re: Merging array with same key - HELP

2009-01-27 Thread Shankar Ganesh
t; > The code is > array3 = {} > array1.each_with_index do |x, i| > array3[x] = array2[i] > end > > > may be it can help u.. > thank you.. > > fyi ==> array1.length == array2.length --> this is rule for that > case( > *MUST*) > >

[Rails] Merging array with same key - HELP

2009-01-26 Thread Shankar Ganesh
Hi , I need to merge an array in ruby on rails. array1 = ['01/01/2009','01/01/2009','10/01/2009','01/01/2009','10/01/2009'] array2 = ['1stjan1','1stjan2','10thjan1','1stjan3','10thjan2'] I need to have array like this array3 = ['01/01/2009'=>'1stjan1-1stjan2-1stjan3','10/01/2009'