put this line in double quote.

['http://www.jobeehive.com/company-reviews/catalog/B?page=#{j.to_i}<http://www.jobeehive.com/company-reviews/catalog/B?page=#%7Bj.to_i%7D>
']
=>

["http://www.jobeehive.com/company-reviews/catalog/B?page=#{j.to_i}<http://www.jobeehive.com/company-reviews/catalog/B?page=#%7Bj.to_i%7D>
"]


This should work

Sandip R~

On Wed, Jul 8, 2009 at 12:05 PM, Santosh Turamari <
[email protected]> wrote:

>
> Hi,,
>
>  I want to generate the sitmap, and i have written the code for that.
> Here beacuse of some inner pagination, I want to get the urls in this
> way.
>
> in sitemap controller
>
>    @catalog_sub_urls = Community.find(:all, :conditions => ['name LIKE
> ?', "#{'B'}%"])
>
>
> in view sitemap.rxml
>
>     i , j = 0 , 1
>  @catalog_sub_urls.each do |sub_url|
>    i = i + 1
>    if i > 50
>      j = j + 1
>       @inner_urls =
> ['http://www.jobeehive.com/company-reviews/catalog/B?page=#{j.to_i}<http://www.jobeehive.com/company-reviews/catalog/B?page=#%7Bj.to_i%7D>
> ']
>    else
>       @inner_urls =
> ['http://www.jobeehive.com/company-reviews/catalog/B?page=#{j.to_i}<http://www.jobeehive.com/company-reviews/catalog/B?page=#%7Bj.to_i%7D>
> ']
>    end
>        end
>  @inner_urls.each do |url|
>      xml.tag! 'url' do
>        xml.tag! 'loc', url
>        xml.changefrq 'daily'
>      end
>    end
>
> The poblem is with this line
> @inner_rls =
> ['http://www.jobeehive.com/company-reviews/catalog/B?page{j.to_i}<http://www.jobeehive.com/company-reviews/catalog/B?page%7Bj.to_i%7D>
> ']
>
> I want it to generate incremented values of j.. But not getting the ways
> to do the same. Or let me know what I am doing is completely wrong
> way.Pls Help me.. its urgent.
>
> Thanx in advance.
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


-- 
Ruby on Rails Developer
http://sandip.sosblog.com
http://funonrails.wordpress.com
www.joshsoftware.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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to