search for: cdemyanov

Displaying 9 results from an estimated 9 matches for "cdemyanov".

2008 Aug 29
3
Many to Many Relationship with One Model
Hey everyone, I''m working on allow users to follow other users in my app so they can receive updates to what all their friends are doing (like Facebook/ Twitter). I''m wondering on how the relationship would be for the model. Sounds like a HABTM type of association, but how would I go about doing it for only one model? Thanks, Tony
2007 Feb 21
2
ActiveMerchant Help
Does anyone know of any good resources for getting ActiveMerchant up and running? I''m trying to get it set up via Paypal Pro and i can''t find detailed, clear directions on setting it up. It''s hard to know where to put what, where paypal login info goes, and how to get the certificate files from paypal and where they go (if I even need them). Anyone have any experience
2008 Nov 01
2
stuck on a validates_presence_of unless issue
i have a person object. Persons don''t need to have addresses, but if they have any address field value, they must have them all. So I have something like this: validates_presence_of :street_address, :city, :state, :postal_code unless :address_blank? address_blank? checks whether all of the address fields are blank. If I run a test like this, it works: describe "given
2008 Dec 19
3
Delete All action
Hi, What is the best way to delete all members of a model? For example I have a tasks model and want to put a link in that will delete all tasks at once. Something like, @tasks = Task.all @tasks.each { |task| task.destroy } Do I need another action for this, and what should the link to it be? cheers, DAZ --~--~---------~--~----~------------~-------~--~----~ You received this message because
2010 Aug 11
6
rspec2 not working with shoulda
I am using rails edge. I am using gem "rspec-rails", "= 2.0.0.beta. 19" . I have following code at spec/models/user_spec.rb require ''spec_helper'' describe User do it { should validate_presence_of(:email) } it { should validate_presence_of(:name) } end Here is my gemfile group :development, :test do gem ''factory_girl_rails'',
2010 Sep 27
3
having some issues with factory_girl and bundler...
Hi All Need some brilliants minds here :) I''m using Rails 2.3.8 & ruby 1.8 (I know, I know... ) I''ve move my gems from .gems to Bundler, but I''m having some issues with Factory_girl when I rake spec "uninitialized constant Factory" I''m following the instructions from http://gembundler.com/rails23.html. Basically: - grab all config.gem and place
2009 Feb 08
8
How to upload data using huge .sql file
Hi, I am using Ruby - 1.8.6 and Rails- 1.2.6. When I trying to upload data using the .sql file through my code I got "Mysql::Error: Lost connection to MySQL server during query: rollback;" File size is 6 MB. The code I have used is like: numberOfRecord = ActiveRecord::Base.connection.update(File.open(fileName).read) Please let me know how I upload data using huge .sql file. If
2009 Feb 18
14
guides on css strategy
I''m having to design the UI to a small site, and that means dabbling in css. I''ve never been able to get any kind of decent idea as to how to decide on classes and id-ing. I''ve had a sniff around the internet without success: people seem to be as clueless as me. I''ve even examined the css/markup of a few sites and it hasn''t been enlightening. Does
2008 May 06
10
Best way to implement?
So I''m new to all this Rails stuff and this is probably a database design-related question to, but here it is... Just for learning I''m trying to build a little real estate listings application. Of course there is the listings model which will store basic information like name, price, description, and all that jazz. I''m to the point where I want to figure out how to