similar to: Model Structure Advise

Displaying 20 results from an estimated 10000 matches similar to: "Model Structure Advise"

2006 Apr 30
3
Problem(?) updating gems - mysql gem
Hi, On OS X (10.4.6), Rails 1.1.2... I tried doing a sudo gem update, and this is the result I''m getting: Upgrading installed gems... Attempting remote upgrade of mysql Attempting remote installation of ''mysql'' Select which gem to install for your platform (powerpc-darwin8.6.0) 1. mysql 2.7.2006.04.21 (mswin32) 2. mysql 2.7 (ruby) 3. mysql 2.6 (ruby) 4. mysql
2006 Jul 07
3
Newbie Model question (HABTM?)
All, If I have a table that has several discrete fields that all point to the same associated field, how do I model it. Specifically, If I have a project table that has 2 fields: specifying_company, and responsible_company. And one table of associated companies, how do I do the :belongs_to / :has_many stuff ie. For a given project company A may be writing the spec, but company B may be paying
2005 Apr 19
3
Rails 0.12.1: No major update without a bit of pain
There''s nothing like pushing a new major update in order to find bugs in the code when its exposed to a couple of hundred working applications. Thankfully the fixes were almost as swift as the reports. In any case, you''ll _definitely_ want to upgrade to 0.12.1 right away. There''s a good handful of fixes for both Action Pack and Active Record (mostly concerning the
2005 Mar 08
19
find_by_sql ON STEROID possible?
find_by_sql BREAKS THE OOP BEAUTY and perhaps we can solve that. NAMING CONVENTIONS can perhaps make find_by_sql much more clever. lets imagine that relation: publishers <- books <-> authors_books <-> authors -> universities (can''t find something else than university for that last association :) ) imagine we want to fetch every book and every associated
2006 Apr 04
6
Replaced Rails Package with HiveLogic Install - problems
Hi, I''ve got a strange problem. I had initially installed Rails using Tony Arnold''s package: <http://www.tonyarnold.com/articles/category/rails> and that worked fine. (on OS X, obviously). I then decided to reinstall using the instructions on the HiveLogic page, to get Ruby 1.8.4: <http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger> That
2006 Jan 23
15
Looking for DB/Model Design Suggestions
Hi, I''m working on an app - my first Rails - and am looking for some suggestions on the best way (or good way) to set up my models / DB. In general there are teams and matches; a team will participate in multiple matches, and in each match there will be 6 teams - 3 vs. 3. I''m going to want to be able, for a particular team, pull up all matches for that team, to display a
2005 Dec 18
7
Testing against 1.8.4
So apparently 1.8.4 is soon forthcoming. We need testing against it. Could someone help out with that? I believe Ara already checked into some of the issues, do you know if those are resolved, Ara? -- David Heinemeier Hansson http://www.loudthinking.com -- Broadcasting Brain http://www.basecamphq.com -- Online project management http://www.backpackit.com -- Personal information manager
2006 Jan 26
2
Rails Edge stability - has_many :through
Hi all, If I was to start developing an application using Edge Rails with the view to deploying on Rails 1.1, would I fall foul of lots of bugs, or is it relatively stable? I''d really like has_many :through relationships, to save me dealing with HABTM + associations. Thanks, Tom
2006 Apr 06
3
Rails 1.1.1: Fixing a slew of minors (but you must still freeze Typo)
Rails 1.1 was a big upgrade with a lot of new features and we''ve been working hard since its release to polish off the kinks revealed after it was deployed to the masses. Rails 1.1.1 contains fixes for things like Prototype memory leaks in IE 6, Oracle adapter runnings, and a number of compatibility tweaks to make most older applications work. This release still doesn''t work
2006 Jan 25
11
Schemas and Migrations
Hello- I''m new to the ruby-based schemas and migrations. As I''m looking over examples and such online, I see that many of them don''t make use of schema-enforced attributes. For example, instead of: t.column "post_id", :integer, :default => 0, :null => false They do: t.column "post_id", :integer So I''m wondering -- is this
2006 Mar 26
10
How to delete a uploaded file with file_column plugin?
Hi, sounds somehow stupid, but I can''t get rid of my files that I uploaded into my application via the file_column plugin. Any suggestions? Cheers Thomas -- Posted via http://www.ruby-forum.com/.
2006 Apr 26
10
Rails Document must be more detailed otherwise...
In java/c++ the method signature provide a good details on which parameters the method accept, but in rails the ability to send hash as parameters make it impossible to know which parameters can be send. This ability make the rails API doc a must to be full of details and not supply partial examples of usage. When for example I see *link_to_remote*(name, options = {}, html_options = {}) I would
2006 Jul 06
2
@oldbid = 0 why?
Okay I''ve been working on a little biding system. In my model I have class Item < ActiveRecord::Base has_many :bids def highest_bid @bid = 0 self.bids.each do |bid| if @bid == nil @bid = bid.max else if bid.max > @bid @oldbid,@bid = @bid,bid.max end end end if @oldbid == 0 "#{@bid} - #{@oldbid+1} = #{@bid -= @oldbid+1}" else dif =
2006 Apr 03
11
View source after AJAX update?
Does anyone know how to view the new source in IE after an AJAX update? When I "view -> source" I get the original page source, not the page source as updated. Thanks in advance, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060403/e8d96b2e/attachment.html
2006 Jun 04
11
Hosting images : DB or File System
Hi, I''m developing an application where I''ll have to store a lot of images coming from the users. And I''m still not sure if I should store them in MySQl as blob or just store them on filesystem. If I store them on filesystem, how to scale when I''ll have to have multiple servers ? Thanks, Pratik -- rm -rf / 2>/dev/null - http://null.in
2005 Jun 07
13
My Rails Day entry: internet command line
Well, my entry for the 24-hour Rails Day competition is here: http://yubnub.org . It''s a web app called YubNub that implements the grandiose idea of a "command line for the Web OS". Type "gim porsche 911" to do a Google Image search for Porsche 911 cars. Type "random 1000" for a random number between 1 and 1000. Type "tts David Heinemeier Hansson is
2004 Dec 07
30
Bind Variables in Active Record
OK, I have some basic functionality to support bind variables, it appears to work with the ''old'' %s style too. I''ve altered sanitize_conditions in activerecord/lib/active_record/base.rb to check whether bind variables are in the statement (/\?/). If they are, replace all the ?s to escaped values from the arguments array. else santize and expand. There are a few
2004 Nov 25
1
gem rails 1.1.0.200411231446 flags has_many error
Hi I updated gem rails today and saw that rails had an update. With the new edition, I get a warning statement printed that was not in the two earlier versions. (No message with either: require_gem ''activerecord'', "= 1.0.0" require_gem ''activerecord'', "= 1.0.0.20041114" ) The code still works, but the warning makes no sense. Plus,
2006 Jan 31
1
Updating :has_many - :through related items
Hi, I''ve got my little app working pretty well. I''m using pretty much the model and table layout from my previous thread, as suggested by Bill Katz: <http://www.ruby-forum.com/topic/52506#26260> I have the Create page working and a delete Match page working, which along with the appropriate record in the Matches table, removes the linked items in the competitions table.
2006 Apr 14
18
RJS Templates & Safari?
Hello, I tried Cody Fauser RJS tutorial (http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates) on my railsplayground dev site and got it to work when using Firefox, but when I tried it on Safari, nothing happens. Then I tried this tutorial - http://rewrite.rickbradley.com/articles/2006/02/06/rjs-templates Similarly, it works fine on Firefox... but with Safari the list is not