[Rails] Re: Store XML format data into database

2011-11-03 Thread Preksha Patel
Hi, Thanks for the reply.. When I puts tag.children[9] like this: doc.xpath('//item').each do |tag| puts tag.children[9] @req = Hash.new @req = tag.children[9] detail.create( :my_field => tag.children[9] ) end I am getting the whole XML Tag. But this tag is not saving

[Rails] Re: Store XML format data into database

2011-11-03 Thread Preksha Patel
Hi, Now I am not getting an error but XML values are stored like '--0 \n'. Code is: doc.xpath('//item').each do |tag| @req = Hash.new @req = tag.children[9] detail.create( :my_field => tag.children[9] ) end And in detail_model.rb class Detail < Acti

[Rails] Store XML format data into database

2011-11-03 Thread Preksha Patel
Hi all, I am making application in Rails 3 in which I am parsing XML file and I want to store one of the XML tag in XML format into Mysql database. I have used 'TEXT' as a datatype to store XML formatted data. I am getting the XML format Tag data but when I store it into database I am getting an

[Rails] How to use custom gem and call custom gem method into Rails 2.3 Application

2011-09-09 Thread Preksha Patel
Hi all, I have made one custom gem and I want to use that gem in my Rails 2.3 Application. It is installed,works fine and it is showing me into gem list. In this Gem's lib folder there is one mygem.rb file and I want to call the method of this mygem.rb file. So, how can I achieve this?? Please c

[Rails] want to get original url from short(i.e tiny,bit.ly etc) url

2010-07-28 Thread Preksha Patel
Hi all, I am using Expurrel gem to get the original url from the short url for all the url shortener services.It works good on the script/console and irb but it is throughing me error like "URI::InvalidURIError in KeywordsController#create" in my application after giving some no. of original ur

[Rails] How to use i.e integrate blog extension with radiant CMS

2010-05-17 Thread Preksha Patel
Hi All, I am new to use radiant CMS, I have installed radiant gem and made one application..And installed blog extension in my application but how can post the new blog in my application??? I can't find any link to post the new blog in my application...So is there any more configuration is req

[Rails] Problem with magic muticonnections

2010-05-12 Thread Preksha Patel
the problem that I can't understand.. So can any one please help me for this?? Thanks in advance, Preksha Patel. -- 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: want to write content in gujarati language in rails apps

2010-04-15 Thread Preksha Patel
Bala wrote: > try this http://guides.rubyonrails.org/i18n.html Hi, Thanks for your reply..But I have already used it in my application which can display the contents in gujarati language but i want to enter the data in gujarati language from the user and want to store it in the database.so i

[Rails] want to write content in gujarati language in rails apps

2010-04-15 Thread Preksha Patel
Hi all, I am working on ruby on rails and i want to write contents in gujarati language i.e user can enter the data in gujarati language when he select the language "Gujarati" so that when user wants to see the site in gujarati language, he can see it..so how can i implement it in rails appli

[Rails] Re: restful plugin with session table

2010-02-02 Thread Preksha Patel
Milan Dobrota wrote: > If you go to console and try to create session objects what happens? > > Milan Dobrota > http://www.milandobrota.com thanks for your reply..session's object is cretaed and there is a database entry in session table.. -- Posted via http://www.ruby-forum.com/. -- You rece

[Rails] restful plugin with session table

2010-02-02 Thread Preksha Patel
hi, I want to use this plugin with sessions table with configuration in environment.rb config.action_controller.session_store = :active_record_store and rake db:sessions:create rake db:migrate but strange its not allowing me to login. and if I remove configuration from environment.rb its workin

[Rails] Re: Send SMS with rails application

2010-01-21 Thread Preksha Patel
Joao Silva wrote: > On Jan 21, 8:38 am, Preksha Patel wrote: >> > With the information you provided, it's hard to tell. Are your gems >> > mar...@marnen.org >> -- >> Posted viahttp://www.ruby-forum.com/. > > > Is there any log register? Or consol

[Rails] Re: Send SMS with rails application

2010-01-21 Thread Preksha Patel
kaiiserni wrote: > Can you send normal emais from your production server? hi, thanks for your reply. yes i can. -- 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 e

[Rails] Re: Send SMS with rails application

2010-01-20 Thread Preksha Patel
Marnen Laibow-Koser wrote: > Preksha Patel wrote: >> >> hi, >> >> I have added SMS sending functionality in my rails application.It >> works in my local pc, but on the live site sms is not sent to any >> one..so, is there any thing which i require to s

[Rails] Send SMS with rails application

2010-01-20 Thread Preksha Patel
hi, I have added SMS sending functionality in my rails application.It works in my local pc, but on the live site sms is not sent to any one..so, is there any thing which i require to setup on the rails server?? thnaks in advance. -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] Re: Paypal Recurring using active merchant

2010-01-20 Thread Preksha Patel
Hamid Raza wrote: > Hi , > > i am also getting the same problem , have you resolved it or not and if > some body else have any idea please do let me know. > > thanks in advance and kind regards, > Hamid. hi, have u solved this problem?? -- Posted via http://www.ruby-forum.com/. -- You recei

[Rails] Re: Store data in db from XML

2009-09-30 Thread Preksha Patel
Colin Law wrote: > 2009/9/30 Smit Shah : >>> What is the problem that is preventing you from storing it in the db? >> I have a model named as Data in which I am storing that data. >> >> @data = Data.new >> @data.title = @rss.entries.title >> >> But when I try to store in db it shows me like " allo

[Rails] how to save data into database from xml

2009-09-29 Thread Preksha Patel
Hi all, I am trying to parse data from rss feed using feed-normalizer which is work properly but now i want to save that data into the database which i am not able to do..so can any one please help me?? Thanks, Preksha.. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~--

[Rails] Re: for crontab

2009-09-22 Thread Preksha Patel
eran is > trying to tell if you click on those links and read. > > -- > Abhinav > > On Wed, Sep 23, 2009 at 9:22 AM, Preksha Patel < have already read it and tried to implement cron also.. thanks, Preksha -- Posted via http://www.ruby-forum.com/. --~--~-~--~~---

[Rails] Re: for crontab

2009-09-22 Thread Preksha Patel
p://wiki.github.com/javan/whenever/instructions-and-examples > > Or if you do better with screencasts: > > http://railscasts.com/episodes/164-cron-in-ruby > > Hope this helps. > > Regards > Kieran > > > On Sep 19, 7:33�pm, Preksha Patel Hey, what you are tr

[Rails] Re: for crontab

2009-09-21 Thread Preksha Patel
Sijo Kg wrote: > Hi >> .but is it for cron or crontab? > > Did not get what you meant by this question. Anyway > > cron is a unix, solaris utility that allows tasks to be automatically > run in the background at regular intervals by the cron daemon > And > Crontab (CRON Table) is a file which

[Rails] Re: for crontab

2009-09-21 Thread Preksha Patel
Preksha Patel wrote: > Preksha Patel wrote: >> Hassan Schroeder wrote: >>> On Sun, Sep 20, 2009 at 11:27 PM, Preksha Patel >>> wrote: >>> >>>> i haven't read man pages for cron or crontab...can you please help me >>>> for that??i

[Rails] Re: for crontab

2009-09-21 Thread Preksha Patel
Hassan Schroeder wrote: > On Sun, Sep 20, 2009 at 11:27 PM, Preksha Patel > wrote: > >> i haven't read man pages for cron or crontab...can you please help me >> for that??i mean from where i can read it?? can you please give me >> link?? > > <http:/

[Rails] Re: for crontab

2009-09-21 Thread Preksha Patel
Preksha Patel wrote: > Hassan Schroeder wrote: >> On Sun, Sep 20, 2009 at 11:27 PM, Preksha Patel >> wrote: >> >>> i haven't read man pages for cron or crontab...can you please help me >>> for that??i mean from where i can read it?? ca

[Rails] Re: for crontab

2009-09-21 Thread Preksha Patel
Sijo Kg wrote: > Hi >> .but is it for cron or crontab? > > Did not get what you meant by this question. Anyway > > cron is a unix, solaris utility that allows tasks to be automatically > run in the background at regular intervals by the cron daemon > And > Crontab (CRON Table) is a file which

[Rails] Re: for crontab

2009-09-20 Thread Preksha Patel
Sijo Kg wrote: > Hi Preksha >Read this > > http://railsenvy.com/2007/6/11/ruby-on-rails-rake-tutorial > > > > > Sijo hi, thanks for giving this link..but is it for cron or crontab? thanks, Preksha.. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~--

[Rails] Re: for crontab

2009-09-20 Thread Preksha Patel
Hassan Schroeder wrote: > On Sun, Sep 20, 2009 at 8:56 PM, Preksha Patel > wrote: > >> as you told to add the code to {RAILS_ROOT}/lib so you mean to say to >> add the code in lib folder, i have to make one file with extension is >> what?? and {RAILS_ROOT}/script/ru

[Rails] Re: for crontab

2009-09-20 Thread Preksha Patel
Hassan Schroeder wrote: > On Sat, Sep 19, 2009 at 12:33 AM, Preksha Patel > wrote: > >> so i want to use cron in ruby on rails application. in application i >> want to fire some query everyday so where i should write the code for >> query so that when cron is

[Rails] for crontab

2009-09-19 Thread Preksha Patel
hi all, i haven't used cron yet but now i want to use it and got some idea about cron from google but not exactly.. so i want to use cron in ruby on rails application. in application i want to fire some query everyday so where i should write the code for query so that when cron is run that query

[Rails] for crone

2009-09-19 Thread Preksha Patel
hi all, i haven't used crone yet but now i want to use it and got some idea about crone from google but not exactly.. so i want to use crone in ruby on rails application. in application i want to fire some query everyday so where i should write the code for query so that when crone is run that qu

[Rails] Re: model validations failed..(as there are two model used)

2009-09-16 Thread Preksha Patel
Saurabh Peshkar wrote: > Please correct me if I'm wrong > > method after_validation collects all the error messages of club model > and rejects the first error message, which is "club is invalid" and > collects the remaining messages into variable and adds them to the error > list. > > Saurab

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Saurabh Peshkar wrote: > try this out, > > in user.rb > > def after_validation > variable = self.errors.reject{ |err| %w{club }.include?(err.first) } > self.errors.clear > variable.each { |err| self.errors.add(*err) } > end > > might work. hi Saurabh, it is now working properl

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Saurabh Peshkar wrote: > Preksha Patel wrote: >> Saurabh Peshkar wrote: >>> what message you get, if you remove :message => nil after >>> validates_associate :club >> >> if i remove :message => nil then i get the message "club is invalid"

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Saurabh Peshkar wrote: > what message you get, if you remove :message => nil after > validates_associate :club if i remove :message => nil then i get the message "club is invalid" -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Preksha Patel wrote: > Saurabh Peshkar wrote: >> Is the code working properly? > > hi if i don't fill any field then error messages are displayed for both > the model but also one message "club nil" as i wrote > validates_associated :club, :message =>

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Saurabh Peshkar wrote: > Is the code working properly? hi if i don't fill any field then error messages are displayed for both the model but also one message "club nil" as i wrote validates_associated :club, :message => 'nil' in users model..and if i fill data only for user model and don't fil

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Preksha Patel wrote: > Saurabh Peshkar wrote: >> Have you commented the line >> >> in club.rb >> validates_associated :user > > no i haven't commented this line.. now i have comment out this line and add this line validates_associated :club, :message =>

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Saurabh Peshkar wrote: > Have you commented the line > > in club.rb > validates_associated :user no i haven't commented this line.. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Preksha Patel wrote: > Preksha Patel wrote: >> Saurabh Peshkar wrote: >>> Have you written >>> >>> in user.rb >>> >>> has_one :club >>> >>> Saurabh >> >> yes because there is one-to-one relationship between

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Preksha Patel wrote: > Saurabh Peshkar wrote: >> Have you written >> >> in user.rb >> >> has_one :club >> >> Saurabh > > yes because there is one-to-one relationship between this two model and > user_id is foreign key in club table..

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Saurabh Peshkar wrote: > Have you written > > in user.rb > > has_one :club > > Saurabh yes because there is one-to-one relationship between this two model and user_id is foreign key in club table.. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~--

[Rails] Re: model validations failed..(as there are two model used)

2009-09-15 Thread Preksha Patel
Saurabh Peshkar wrote: > Can you share your model? yeah sure.. club.rb file: class Club < ActiveRecord::Base belongs_to :user belongs_to :city belongs_to :agegroup belongs_to :matches_type belongs_to :role has_many :photos, :as => :attachable #acts_as_rateable has_many :rating

[Rails] Re: model validations failed..(as there are two model used)

2009-09-14 Thread Preksha Patel
Preksha Patel wrote: > Saurabh Peshkar wrote: >> Then try this, >> >> in users_controllers.rb >> >> def create >> @user = User.new(params[:user]) >> @club = @user.build_club(params[:club]) >> >> if @user.valid? >> @user.sav

[Rails] Re: model validations failed..(as there are two model used)

2009-09-14 Thread Preksha Patel
Saurabh Peshkar wrote: > Then try this, > > in users_controllers.rb > > def create > @user = User.new(params[:user]) > @club = @user.build_club(params[:club]) > > if @user.valid? > @user.save > end > > end > > Note: it is not required to specify @club.save because '.build' will > autom

[Rails] Re: model validations failed..(as there are two model used)

2009-09-14 Thread Preksha Patel
Preksha Patel wrote: > Saurabh Peshkar wrote: >>> hi Saurabh >>> >>> but i don't need to write @user.save any where? >>> >>> >>>> >>>> This will check if both are valid or not and save them at same tim

[Rails] Re: model validations failed..(as there are two model used)

2009-09-14 Thread Preksha Patel
Saurabh Peshkar wrote: >> hi Saurabh >> >> but i don't need to write @user.save any where? >> >> >>> >>> This will check if both are valid or not and save them at same time, if >>> any one of them is invalid nothing gets saved. >>> >>> Saurabh. > > Please let me know which controller are y

[Rails] Re: model validations failed..(as there are two model used)

2009-09-14 Thread Preksha Patel
Saurabh Peshkar wrote: >> hi Saurabh >> >> there is one-to-one relationship between club and user.. >> and in club model i have used both >> validates_associated :user >> validates_presence_of :user_id, :message => nil >> then also it is not working.. >> >> and in view page i already specified e

[Rails] Re: model validations failed..(as there are two model used)

2009-09-14 Thread Preksha Patel
Saurabh Peshkar wrote: > Hi Preksha, > > Are you using '.build' parameters. > > (e.g. @club = Club.new > @user = @club.users.build(params[:user]) for one(club) to many(users) > relations) > > and in view page > > specify <%= error_messages_for :club, :user%> > > Hope this might help. > > Sa

[Rails] model validations failed..(as there are two model used)

2009-09-14 Thread Preksha Patel
i have used two model club and user in one form but validation doesn't call for child model even i have written validates_associated :user in parent model..when i fill information for user and don't fill for club then validations are called for club but user is saved which i don't want..so please