[Rails] Importing LinkedIn Contacts

2011-07-31 Thread Srikanth Jeeva
linkedin contacts in a page. 4. User selects some contacts and clicking submit, will send a invite message to those selected contacts. Is there any Gem or plugin in rails 3 to achieve this? Regards, Srikanth Jeeva -- Posted via http://www.ruby-forum.com/. -- You received this message because

[Rails] replace_html does not qork in jQuery

2011-02-20 Thread Srikanth Jeeva
Hi, In my Rails application I have used jQuery instead of Prototype. When I was using prototype I use, render :update do |page| page.replace_html :div_id, :partial = partial_name end How can i do this with jQuery? Thanks in advance, Srikanth J http://srikanthjeeva.blogspot.com/ -- Posted

[Rails] Re: replace_html does not qork in jQuery

2011-02-20 Thread Srikanth Jeeva
use a js template. ie, if you are in the update action, create an update.js.erb and write the js function there Thanks a lot.. I will try 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.

[Rails] Re: Newb: Order page, multiple view single model question

2011-02-20 Thread Srikanth Jeeva
I'm not sure if this is the right way, wht i did in the same case was, converting it to JSON and pass the params. I didn't like to store a large params in session and so i did like this. def process_new @order = Order.new(params[:order]) end In the view.. %= hidden_field_tag order_json,

[Rails] Passing Object in params, and parse.

2011-02-08 Thread Srikanth Jeeva
Hi, Im passing an object as follows. Controller: def new @c = Check.first end View: form action=create method=post %= hidden_field_tag checks, @c % %= submit_tag submit % /form The params i get in create method is, {checks=#Check:0xa2c3134, commit=submit} Any idea how to parse

[Rails] Re: Passing Object in params, and parse.

2011-02-08 Thread Srikanth Jeeva
Hi David, def create @check = params[:checks] # and then you can manipulate it here # @check.inspect end @check.inspect gives me,.. #Check:0xa2c3134 any idea how can i make it {name = XXX, number = YYY} Thanks, Srikanth -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: Passing Object in params, and parse.

2011-02-08 Thread Srikanth Jeeva
Hi Pascal, what you see in the params is not the Check object but it's string representation. There is no sane way to get the actual object out of this. I guess what you want is to pass the id of the check object and not the object itself. for example of object i made it @c = Check.first.

[Rails] Re: Re: Passing Object in params, and parse.

2011-02-08 Thread Srikanth Jeeva
What you can consider doing is attaching the Check object's id into the hidden_field, and then pass the id into your create method. Actually there was no id for that object. I did like this. converted to json and parsed it. def new @c = Check.new @c.name = Srikanth @c.number = 1234 @a

[Rails] Re: fb-connect -Missing client_id parameter

2011-01-04 Thread Srikanth Jeeva
It works good in local machine, but in server it shows the error message like this. { error: { type: OAuthException, message: Missing client_id parameter. } } Register your Application name in facebook. Send Client_id in param. Check this doc.

[Rails] Search Fullname, in two fields firstname, lastname.

2010-12-07 Thread Srikanth Jeeva
Hi, I have a Model named User. It has two columns firstname, lastname. There a record with id=1, firstname=srikanth and lastname=Jeeva While Using search: keyword = Srikanth Jeeva And I write a Query: User.find(:all, :conditions=[firstname like ? or lastname like ?, '%keyword%', '%keyword

[Rails] Re: Search Fullname, in two fields firstname, lastname.

2010-12-07 Thread Srikanth Jeeva
keyword = Srikanth Jeeva record. Split the keyword into parts and use the two parts separately in the query. Have a look at the split method of ruby String class. Thanks for response. After splitting i write query like this, keyword = Srikanth Jeeva splitted_word = keyword.split

[Rails] Re: On click, open new text box in Ruby on Rails

2010-11-24 Thread Srikanth Jeeva
Vineeth Pradhan wrote in post #963498: Hello, I have a BlogPost resources, where in BlogPost 'show' screen, I want a new comment button to be displayed and only on clicking that button I want the new Comment view to be rendered into the same page. I would like to use ajax concept to do this.

[Rails] Double click the submit button, submits form twice

2010-11-18 Thread Srikanth Jeeva
Hi, I have a form, When i click submit button twice, My form gets submitted twice, and 2 entries are saved. But I need only 1 entry to be saved. Any idea on how to do it? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups

[Rails] Re: Double click the submit button, submits form twice

2010-11-18 Thread Srikanth Jeeva
Norbert Melzer wrote in post #962309: Hidden field wich unique ID. If the ID is submitted twice, omit the new entry That did it. Thanks all for reply. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Redirect issue after update

2010-10-28 Thread Srikanth Jeeva
Now what is the exact problem here. -- 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-t...@googlegroups.com. To unsubscribe from this group, send

[Rails] Re: Redirect issue after update

2010-10-28 Thread Srikanth Jeeva
Fine. Can you check the log, copy paste the params that you get for the action. Also paste the log till redirect occurs. -- 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,

[Rails] Re: Re: Validates numericality issue

2010-08-31 Thread Srikanth Jeeva
Another question... if I want to set a field blank for each field that had an error how would i do that? you can do this in view file.. give a sample that you use in ur view file. so that i could help it out. -- sri -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] Re: Active Scaffold

2010-08-30 Thread Srikanth Jeeva
This is FYI. If you are using Active Scaffold plugin, please make sure that you are using the relevant version of Active scaffold for your Rails version. Due to mismatch of Active Scaffold version and Rails, it'll throw error. I have installed latest version of calendar date select..

[Rails] Re: Re: display records for today's date

2010-08-23 Thread Srikanth Jeeva
This will be slower than the BETWEEN option above. The issue with this is that the database has to compute the date for every row in the table. Not an issue if you don't have many rows. If you have lot of rows, it can be a noticeable performance hit. The other reason to use the BETWEEN

[Rails] Re: Trying to make a user list from 2 fields

2010-08-20 Thread Srikanth Jeeva
Bob Smith wrote: My model has two fields that I want in a customer list for an index page. They are name and second_name. I need a way to combine them in a collection with their id numbers so the Edit links will work. Sounds like SQL, but I'm not sure. maybe something like: SELECT name, id

[Rails] display records for today's date

2010-08-20 Thread Srikanth Jeeva
Hi, I'm having User model it has created_at field. If i want to find all the users who are created today. How can i write the query? created_at field has datetime in it. how can i search for records in current date? Thanks, Srikanth -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: display records for today's date

2010-08-20 Thread Srikanth Jeeva
Michael Pavling wrote: On 20 August 2010 07:17, Srikanth Jeeva li...@ruby-forum.com wrote: created_at field has datetime in it. how can i search for records in current date? Model.all(:conditions = [created_at BETWEEN ? AND ?, Date.today, Date.tomorrow]) Thanks for the reply,, I used

[Rails] image_submit_tag

2010-08-19 Thread Srikanth Jeeva
Hi Im using image_submit_tag to submit my form. works fine.. but the image is displayed with border. I used border = 0 but no use. This is my code. %= image_submit_tag ../images/upload.png, :border = 0 % any ideas?? Regards, Srikanth -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Re: image_submit_tag

2010-08-19 Thread Srikanth Jeeva
Srikanth Jeeva wrote: Hi Im using image_submit_tag to submit my form. works fine.. but the image is displayed with border. I used border = 0 but no use. This is my code. %= image_submit_tag ../images/upload.png, :border = 0 % any ideas?? Regards, Srikanth I used this it worked

[Rails] Paypal account varification

2010-04-29 Thread Srikanth Jeeva
Hi, I want to collect users paypal account. Verify if its a paypal account Pay user at anytime. Paypal account is the email which the user has registered with paypal. Is there any way to verify if the email given by user, is registered with paypal(ie. the email provided should be the users

[Rails] Re: Suggest a wav or aiff player

2010-03-10 Thread Srikanth Jeeva
Robert Walker wrote: Srikanth Jeeva wrote: Hi, Plz suggest me a player to play .wav or .aiff files. so that i can use it in my Ruby on Rails App. The server-side has nothing to do with this. Players exists client-side. Web browsers will typically rely on a plugin to play sound files

[Rails] Suggest a wav or aiff player

2010-03-09 Thread Srikanth Jeeva
Hi, Plz suggest me a player to play .wav or .aiff files. so that i can use it in my Ruby on Rails App. Thanks, Srikanth -- 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,

[Rails] Attachment fu file path

2010-02-24 Thread Srikanth Jeeva
Hi I am using attachment fu plugin for uploading data. say : User has_many :photos I wanted to save the uploaded photo in the path as follows. /files/user_id/photos/1.jpg - while uploading first photo /files/user_id/photos/2.jpg - while uploading second photo 1) Is there any way to make a

[Rails] validates_numericality_of , need to accept -

2010-01-25 Thread Srikanth Jeeva
Hi, I am using validates_numericality_of :phone_number for validation of phone number. The phone number must also accept -. for Example, 044-42652144 Can any one please help how to do it, Thanks, Srikanth J http://srikanthjeeva.blogspot.com -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Re: Object#type is deprecated; use Object#class

2009-09-25 Thread Srikanth Jeeva
I have got the same error! I have used this: u = User.find 1 u.type (irb):21: warning: Object#type is deprecated; use Object#class u.class.name = Admin so i have used u.class.name instead u.type Thanks, Srikanth J http://srikanthjeeva.blogspot.com -- Posted via

[Rails] Re: suggestion in plugin for amazon payment

2009-06-09 Thread Srikanth Jeeva
HI, I finally didn't use any plugin for amazon payment, did with Amazon simple pay.. It offers a good ruby code, to create checkout button. here is the code given by amazon for creating button. The Price,return url can be dynamically changed. require 'base64' require

[Rails] suggestion in plugin for amazon payment

2009-06-01 Thread Srikanth Jeeva
Hi, Please suggest me a good plugin for amazon payment in Rails. Thanks in advance, Srikanth J http://www.srikanthjeeva.blogspot.com http://www.srikanthj.co.nr -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: Validation - set focus

2009-03-03 Thread Srikanth Jeeva
really thanks man -- 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

[Rails] Validation - set focus

2009-03-02 Thread Srikanth Jeeva
hi, Is there any way to set focus in a particular field, after validation in rails?? or we have to use only javascript. For example., validates_presence_of :username (assume there is no username given) after validation, how can i set focus in that particular username textbox. is there any way

[Rails] Re: Validation - set focus

2009-03-02 Thread Srikanth Jeeva
ya i can do it with JS, any way in rails?? my ror blog http://www.srikanthjeeva.blogspot.com -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk