[Rails] Re: Function Testing Reloading Fixtures before assertion *Solved*

2009-09-03 Thread Nilesh Kulkarni
brianp wrote: > Nilesh, > > using: > assert_equal :published, words(:one).status > delete :destroy, :id => words(:one).to_param > word_status = Word.find(:id).status > assert_equal :deleted, word_status > still returns // ActiveRecord::RecordNotFound: Couldn't find Word with >

[Rails] Re: Function Testing Reloading Fixtures before assertion *Solved*

2009-09-03 Thread Nilesh Kulkarni
> def test_should_delete_word > assert_equal :published, words(:one).status > delete :destroy, :id => words(:one).to_param > reload! > word_status = Word.find(:id).status > assert_equal :deleted, word_status > end > Again returns: MethodError: undefined method `reload!' for

[Rails] How to run rake thinking_sphinx:index in test environment ?

2009-08-28 Thread Nilesh Kulkarni
Hi, I tried 'rake thinking_sphinx:index RAILS_ENV=test' but it throws following error F:\test_sarasaves\sarasaves>rake thinking_sphinx:index RAILS_ENV=test (in F:/test_sarasaves/sarasaves) Generating Configuration to F:/test_sarasaves/sarasaves/config/ test.sphinx.conf Sphinx 0.9.8-release (r15

[Rails] Re: Deleting Data After Viewing On Page

2009-08-25 Thread Nilesh Kulkarni
Tom Dunn wrote: > I'm creating a site that allows users to upload a picture. The picture > they uploaded will be shown randomly for a period of time then another > one will come on. When they upload it, they pay a certain price, > depending on how many times they want it to be viewed. I want it t

[Rails] testing thinking_sphinx

2009-08-25 Thread Nilesh Kulkarni
hello All, I am using thinking_sphinx for search method , i am writing testing for it, but when i try to run it in test environment it gives me following error D:\sarasaves>rake thinking_sphinx:index RAILS_ENV=test (in D:/sarasaves) Generating Configuration to D:/sarasaves/config/test.sphin

[Rails] google map

2009-07-24 Thread Nilesh Kulkarni
hi all I am using google map in my application, I am adding "labeled Markers" i.e A,B,CZ, in my map, it is working but I want to display marker and it's information on page same as Google map i.e if we search "coffee shop austin". map displays list of coffee shop on left and correspondin

[Rails] Re: how to pass ruby objects to javascript ?

2009-07-24 Thread Nilesh Kulkarni
Nilesh Kulkarni wrote: > thanks for reply > function google_map(){ > for(var j=0; j < locs.length; j++) > { > marker=addMarker(locs[i]['lat'], locs[i]['lng']) > }} ooo not var locs = (#...@locations.to_json}); but locs = (#{locations.to_j

[Rails] Re: how to pass ruby objects to javascript ?

2009-07-24 Thread Nilesh Kulkarni
Wayne Simacek wrote: > Are you using the GeoKit Rails plugin? > > On Jul 23, 3:52�am, Max Williams no... -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] Re: how to pass ruby objects to javascript ?

2009-07-24 Thread Nilesh Kulkarni
thanks for reply I have done it something like = render :partial => 'coupons/search', :locals => {:locations => business_locations.} in "_search.html.haml" :javascript var locs = (#...@locations.to_json}); function google_map(){ for(var j=0; j < locs.length; j++) { marker=addMarker(locs

[Rails] how to pass ruby objects to javascript ?

2009-07-22 Thread Nilesh Kulkarni
hi all, I have following problem, I am using google map api , I have "business_locations" array defined in view it contains latitude and longitude in following format lng-142.122745lat42.674224 lng-112.122745lat46.674224 lng-122.122745lat40.674224 I am sending locations array to partia

[Rails] rails and haml

2009-04-22 Thread Nilesh Kulkarni
hi all what ia used for? -- 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.

[Rails] haml tag

2009-04-20 Thread Nilesh Kulkarni
hi all any one know what is and when it is used? -- 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 rubyon

[Rails] Re: About haml and ruby on rail

2009-04-18 Thread Nilesh Kulkarni
Marnen Laibow-Koser wrote: > On Apr 14, 7:55�am, Nilesh Kulkarni > wrote: > > You have an elsif without a condition. Did you mean else? And why an > h4 when there's no h3 to nest it in? > > Let me know if you have any further questions. But if you're goin

[Rails] Re: About haml and ruby on rail

2009-04-14 Thread Nilesh Kulkarni
Marnen Laibow-Koser wrote: > Nilesh Kulkarni wrote: > > So you probably have a missing parenthesis or something like that. But > we can't tell for sure without seeing the Haml file. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@ma

[Rails] About haml and ruby on rail

2009-04-14 Thread Nilesh Kulkarni
hi all, I am converting my view into HAML format i have done it with "Html2Haml" command, then I removed all the "- end" from haml code and my indentation is also correct,but now it shows following errors I have kept code of show.html.erb and show.html.haml in attachment. please help me I

[Rails] Re: about HAsh in ruby

2009-03-15 Thread Nilesh Kulkarni
senthil raja wrote: > HI Nilesh > > Your Question is not clear, > > Can you explain with some example > > On Sat, Mar 14, 2009 at 6:13 PM, Nilesh Kulkarni < ok I am fetching value from database and displaying it in text_area ,consider book table.I have three fields

[Rails] about HAsh in ruby

2009-03-14 Thread Nilesh Kulkarni
HI ALL, I want to add values present in hash text_fields on form after form is displayed. is it possible, how can i do it. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

[Rails] Re: update_attributes and validation

2009-03-13 Thread Nilesh Kulkarni
Sumanth Krishna wrote: > try with update_attributes! (which internally uses 'save!') > > On Fri, Mar 13, 2009 at 2:00 PM, Nilesh Kulkarni < > rails-mailing-l...@andreas-s.net> wrote: > >> and 2028" >> 50 don2000 $400 >&

[Rails] update_attributes and validation

2009-03-13 Thread Nilesh Kulkarni
hi all, I am updating 50 records on one page with update_attributes method ,my validations are validates_numericality_of :year, :greater_than_or_equal_to => 1900, :less_than_or_equal_to => 2028, :message => "Year must be between 1900 and 2028" valdate_presence_of:title valdate_presence_of

[Rails] will_paginate plugin

2009-03-09 Thread Nilesh Kulkarni
hi all, I am using will_paginate plug_in i am getting URL as http://localhost:3000/admin/edit#/admin/edit?page=3 but i want it should be http://localhost:3000/admin/edit?page=3 how can I do it. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] controller and views

2009-02-24 Thread Nilesh Kulkarni
hi, I am writing an application in which i have list of books fetching from data base,i am using textbox to display that data from database .ie "xyz" hindi, are in textbox. i am displaying 100 record per page ,i want to use single save button that will save changes in all page instead of for eac

[Rails] patching

2009-01-19 Thread Nilesh Kulkarni
hi I have a patch and i want to apply it to image_science.rb, how can i apply please inform me -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Ra

[Rails] about RMagic

2009-01-15 Thread Nilesh Kulkarni
hi i am using attachment_fu with Rmagic(RMagick-2.7.1-ImageMagick-6.4.5-3-Q8) i am thumbnailing image.code is as follows it is thumbniling onlt .gif image not other .Is there any problem with RMagic version. what else i can do code is as bellow 1>code of model(asset) class Asset < ActiveRec

[Rails] about attachment_fu

2009-01-14 Thread Nilesh Kulkarni
I am using attachment_fu but in database it is nit storing it's hight and width what should i do. -- 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] about image_science library

2009-01-13 Thread Nilesh Kulkarni
hi. I am using attachment_fu Can anyone tell me how to get image_science image library and how to use it. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on

[Rails] about attachment_fu

2009-01-12 Thread Nilesh Kulkarni
hi i have one bookshop project.whose database table is as follows create_table :books do |t| t.string :title t.text :description t.string :image_url t.decimal :price t.datetime :date_available end I want to use attachment_fu with this project how can i use it --

[Rails] Re: about magick library

2009-01-12 Thread Nilesh Kulkarni
Vishwanath Nayak wrote: > Hi, > > you need both of those, image magick to do the image modifications > rmagick is written to integrate image magick with ruby > > NAYAK > > On Mon, Jan 12, 2009 at 3:08 PM, Nilesh Kulkarni < > rails-mailing-l...@andrea

[Rails] about magick library

2009-01-12 Thread Nilesh Kulkarni
hi.. I am using attachment_fu in my project i want to know that which of following library is good please help me 1>imagemagick 2>RMagic -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t