[Rails] Re: Function Testing Reloading Fixtures before assertion

2009-09-02 Thread Nik Cool
Returns reload is not method. sorry for wrong syntax it must be reload! you are using Word.find(:id.to_param).status in assert instead of that use Word.find_by_user_id(1).status( as per your fixture in first post) def test_should_delete_word assert_equal 'published',

[Rails] Re: Function Testing Reloading Fixtures before assertion

2009-09-01 Thread Nik Cool
Here is the test: def test_should_delete_word assert_equal 'published', words(:one).status debugger delete :destroy, :id = words(:one).to_param assert_equal 'deleted', words(:one).status end It fails on the last with: deleted expected but was published. if

[Rails] Re: Function Testing Reloading Fixtures before assertion

2009-09-01 Thread Nik Cool
def test_should_delete_word assert_equal 'published', words(:one).status debugger delete :destroy, :id = words(:one).to_param Word.reload word_status=Word.find(:id).status assert_equal 'deleted', word_status end -- nik -- Posted via

[Rails] Re: Expected response to be a :success,but was 500

2009-08-31 Thread Nik Cool
was [quote] Expect response to be a :success,but was 500 [/quote] Am I missing something ? what is output in test log file? you can try this on console follow the steps 1)go to console (ruby script/console) 2)app.get /catalog see what response you get -- Posted via

[Rails] Re: Expected response to be a :success,but was 500

2009-08-31 Thread Nik Cool
fireflyman wrote: Session ID: 6efd9f650c0eb779f4726c3b5b0c609c Parameters: {} ActionController::RoutingError (No route matches /catalog with {:method=:get}): Rendering C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/templates/rescues/layout.erb (not_found)

[Rails] Re: Expected response to be a :success,but was 500

2009-08-31 Thread Nik Cool
fireflyman wrote: So,What should I do ?I'm a fresher. go to http://guides.rubyonrails.org/testing.html http://6brand.com/rails-integration-testing-how-to-learn.html read about rails integration testing do rake routes you will get all the routes in your application then perform integration

[Rails] Re: rake db:test:clone_structure and related tasks fail

2009-08-28 Thread Nik Cool
rake aborted! wrong number of arguments (2 for 1) /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake: 344:in `recreate_database' Thanks! Thomas do you have test database created ? -- Posted via http://www.ruby-forum.com/.

[Rails] Re: SWF multiple file upload

2009-08-28 Thread Nik Cool
mahesh wrote: Hi guys Im new to rails i would like to create app with swf file upload with multiple file upload, is that any sample app is available with multiple file uploads plz give me some reference for me Ur's Mahesh Use Acts_As_Attachment plugin

[Rails] Re: Authorize.net CIM(Customer Information Manager)

2009-08-28 Thread Nik Cool
Ghanshyam Rathod wrote: Hi all, Please help me out for authorize.net CIM(customer information manager) implementation. thanks go to this site http://www.rubyplus.org/episodes/68-Rails-with-Active-Merchant-Authorize-Net-CIM-Gateway.html -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Date precedence validation (ex. Round Trip travel dates)

2009-08-28 Thread Nik Cool
Any ideas? Kind regards Axinte validates_date_time plug in may help... -- 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

[Rails] Re: Ruby on Rails test:integration Expected response to be a :redirect, but was 404

2009-08-26 Thread Nik Cool
Looking around -- someone had a problem that the new object was not created or saved. One of the tests in products_controller_test.rb has no problem creating a new product. What am I missing? try this. this may work test product_administartion_by_admin do category =

[Rails] Re: Anything but Aptana

2009-08-26 Thread Nik Cool
Please, someonepoint me to a decent, lightweight IDE. All i want is syntax coloring. I'm thinking notepad++ here. Anyone have a better solutions? Thanks. RVince try NetBeans IDE it's nice -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] links on page

2009-08-26 Thread Nik Cool
hi all, On my page i am displaying business url entered by user it stored in database (code is in haml) = link_to @user.website,@user.website if url stored in database is www.abc.com then on click of that link it goes to http://sarasaves/at/www.abc.com and shows Routing Error No

[Rails] Re: links on page

2009-08-26 Thread Nik Cool
Tim Teng wrote: You may try link_to www.abc.com, http://www.abc.com;. but, i am taking different values of business_url from database depending on user -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: links on page

2009-08-26 Thread Nik Cool
You might want to (re)consider which is most appropriate to store for your app's current and future use. FWIW, -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan it's working Thnaks... -- Posted via http://www.ruby-forum.com/.

[Rails] Re: How to handle absolute URL that user inputs into a table?

2009-08-26 Thread Nik Cool
How do I make it that no matter what the user type it, link_to would take them to an external site? Sorry if this sounds like a too basic question. Thanks. try this this may work link_to @user.website,http://#...@user.website};, :popup =true -- Posted via

[Rails] Re: How to handle absolute URL that user inputs into a table?

2009-08-26 Thread Nik Cool
How do I make it that no matter what the user type it, link_to would take them to an external site? Sorry if this sounds like a too basic question. Thanks. do this no matter what URL user enters it will take him to correct page regex = /https?:\/\/(.*)/.match(@user.website)

[Rails] Re: Integrating one rails application into another

2009-08-26 Thread Nik Cool
Any thoughts and suggestion will be appreciable. Thanks, Sandy hi,. may be you can prepare rails engine or plug in of one application and install in into another... -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this