[Rails] Re: Collection_select

2011-10-10 Thread Mathew Vivek
you r fetching entire Equipo tables. you have to use distinct option to get (A,B,C) alone regards mathew -- 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 ru

[Rails] Re: Unable to add Fonts in Tinymce Editor

2011-10-05 Thread Mathew Vivek
Is there is any other way to setup fonts in tinymce editor ?? -- 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@googlegroups.com. To unsubscri

[Rails] Unable to add Fonts in Tinymce Editor

2011-10-05 Thread Mathew Vivek
Hi, I am using a tinymce editor in my app. i was not able to see any fonts in my editor. i am using tinymce plugin for this one. in hammer.rb : the code looks this @@init = { :paste_convert_headers_to_strong => true, :paste_convert_middot_lists => true, :paste_remov

[Rails] Re: NoMethodError in XXXXXXXXXController#create

2011-09-24 Thread Mathew Vivek
hi, could you tell me the line you got error ? it sounds like u r going a add a HamtranZeeldegchs row. if @personal_information.save HamtranZeeldegchs.new(params[:hamtran_zeeldegch]['0']) # This line is may a error. hzs = HamtranZeeldegchs.new(params[:hamtran_zeeldegch]['0'])

[Rails] Redirecting devise after login

2011-09-24 Thread Mathew Vivek
hi, i am using devise gem in my app for authentication. if i enter link1 -> http://localhost:3000/users/sign_in, once i login, it will be redirected to link2 -> http://localhost:3000/user/dashboard. if i can add new posts or comments for that user using this link link3 ->

[Rails] Re: Sorting an array using relationships

2011-09-23 Thread Mathew Vivek
thanks Tim and i will update u once i completed this module. -- 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@googlegroups.com. To unsubscrib

[Rails] Re: Sorting an array using relationships

2011-09-23 Thread Mathew Vivek
thanks tim for your response i have tried that one. but i have to sort in this order status = [1,4,5,6,2,3,8,9,7] -- 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, sen

[Rails] Re: Sorting an array using relationships

2011-09-23 Thread Mathew Vivek
Hi, I am having a New Requirement. I want to sort a array of elements in which @posts = Post.all(:include=>[:messages],:conditions => ["status in (?) ", [1,2,3,4,5,6,8,9]],:order => "messages.created_at DESC") posts table has a column named status as u see above. i want to sort this arra

[Rails] Re: Sorting an array using relationships

2011-09-20 Thread Mathew Vivek
Thanks all, scope :get_by_publish_on, lambda{ |status| joins(:postmessages).where('status in (?)', status).order("publish_on desc").group('posts.id') } thanks colin for your idea, you are insisting like this ?? -- Posted via http://www.ruby-forum.com/. -- You received this message because

[Rails] Re: Sorting an array using relationships

2011-09-20 Thread Mathew Vivek
this is the code @posts = Post.all(:include=>[:messages],:conditions => ["status in (?) ", [1,2,3,4,5,6,8,9]],:order => "messages.created_at DESC") plz check whether it is correct syntax?? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to t

[Rails] Sorting an array using relationships

2011-09-20 Thread Mathew Vivek
Hi, I want to sort a array objects which depends upon relationships between two tables. table 1 : comments table 2 : comments_date Once a comment is added, the date which it is created will be saved in comments date table.. now i want to sort the comments array with respect to date it is creat

[Rails] Re: Re: Saving Google Map Image

2011-09-19 Thread Mathew Vivek
Dheeraj Kumar wrote in post #1022364: > Did you see this? > > http://code.google.com/apis/maps/documentation/staticmaps/#quick_example > > If this is not the output you require, please be clear in what you need. thanks dheeraj i have completed by forming a url dynamically replacing the lat long

[Rails] Re: how to use ym4r and geokit together

2011-09-19 Thread Mathew Vivek
venkata reddy wrote in post #1022656: > My requirement is User should be able mark a place with his given > address.And that should be searchable by anyone using the application. > > Besides it, i want to implement all the search functionalities that > geokit is providing. > For Better understandin

[Rails] Re: how to use ym4r and geokit together

2011-09-19 Thread Mathew Vivek
venkata reddy wrote in post #1022630: > Anybody used ym4r and geokit gems together? > I am in start of developing a project like http://hotspotr.com. I > hope these two gems can bring that kind of functionality. > Any ideas or experiences? > > Thanks in Advance... explain regarding your requremen

[Rails] Editors in Rails

2011-09-18 Thread Mathew Vivek
Hi, I have used tiny-mce editor in my current app. I am facing some sort of issues. I want to know is there are any kinds of editors supported by rails(compatible). regards, mathew -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: Saving Google Map Image

2011-09-16 Thread Mathew Vivek
Dheeraj Kumar wrote in post #1022296: > Get the center, width, height. Use Google Static Map API to retrieve a > image > with those data. Thanks Dheeraj for your help I searched for Static Map API resources i studied the documents but i couldnt end up with the clear idea... Could anyone t

[Rails] Re: belongs_to not working as

2011-09-16 Thread Mathew Vivek
class TestUser has_one :score end class Score belongs_to :test_user end score table will has id,test_user_id,score if you want to get a user score just give test_user.score -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups

[Rails] Re: ActiveRecord Object check based on Date field

2011-09-16 Thread Mathew Vivek
Weather.exists?(:weather_date => 22/09/11 ) if data is a string containing '22/09/11' Check whether it works.. Weather.exists?(:weather_date => data.to_date ) or check date rdoc clearly for correct format -- Posted via http://www.ruby-forum.com/. -- You received this message because y

[Rails] Saving Google Map Image

2011-09-16 Thread Mathew Vivek
Hi, Is there is any option for saving a google map image while submitting a page. thanks in advance Mathew -- 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

[Rails] Re: Re: Re: Browser compatibility Issue : Upload and Preview using Paperclip

2011-09-16 Thread Mathew Vivek
Colin Law wrote in post #1022271: > On 16 September 2011 07:39, Mathew Vivek wrote: >>> get help. > > And running it with firebug in firefox? > I didnt see any errors in firebug. I have tried another script right now. it is working in ubuntu(firefox,chrome).. I have to che

[Rails] Re: Re: Browser compatibility Issue : Upload and Preview using Paperclip

2011-09-15 Thread Mathew Vivek
Colin Law wrote in post #1022182: > On 15 September 2011 14:58, Mathew Vivek wrote: >> Tim Shaffer wrote in post #1022142: >>> You basically need to preview an before it has been >>> submitted? This sounds more like a JavaScript question than a Rails >>> quest

[Rails] Re: Browser compatibility Issue : Upload and Preview using Paperclip

2011-09-15 Thread Mathew Vivek
Tim Shaffer wrote in post #1022142: > You basically need to preview an before it has been > submitted? This sounds more like a JavaScript question than a Rails > question. This issue corresponds to javascript+css concept only. -- Posted via http://www.ruby-forum.com/. -- You received this me

[Rails] Browser compatibility Issue : Upload and Preview using Paperclip

2011-09-15 Thread Mathew Vivek
Hi, I am using uploading(img) process in my app using paperclip. My new requirement is to preview before submitting. My new requirement works only in FIREFOX not in IE,CHROME,SAFARI. My code looks this. <%= form.file_field :image, :onchange=> "setImage(this);" %> function setImage(fil

[Rails] Re: Re: Retrieving entire zipcodes for a city using GOOGLE API

2011-09-05 Thread Mathew Vivek
Martin Wawrusch wrote in post #1020213: > why not simply download them from here: > http://sourceforge.net/projects/zips/ > > Those are for the US, others are out there as well although I don't have > links handy. Thanks a lot Martin.. I am also doing it for US. I can do it by backuping the dat

[Rails] Re: Retrieving entire zipcodes for a city using GOOGLE API

2011-09-05 Thread Mathew Vivek
Google Maps Integration with Rails -- 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@googlegroups.com. To unsubscribe from this group, send em

[Rails] Re: Retrieving entire zipcodes for a city using GOOGLE API

2011-08-30 Thread Mathew Vivek
Could somebody guide me regarding this requirement ?? -- 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@googlegroups.com. To unsubscribe from

[Rails] Retrieving entire zipcodes for a city using GOOGLE API

2011-08-29 Thread Mathew Vivek
Hi, How to retrieve entire zipcodes for a city using google_api. In detail, if a city contains n number of zipcodes. I have to fetch all the zipcodes. thanks in advance. Mathew vivek A -- Posted via http://www.ruby-forum.com/. -- You received this message because

[Rails] will_paginate with multiple params

2011-03-28 Thread Mathew Vivek
Hi, This is Mathew vivek A I am facing some problems using will_paginate for multiple params Can anyone explain me in detail My code is : <%= will_paginate @areas,:params => {:field_officer => params[:field_officer],:branch => params[:branch]}%> -- Posted via http://www