similar to: Model Composition in Rails

Displaying 20 results from an estimated 1000 matches similar to: "Model Composition in Rails"

2006 Jan 11
2
Creating a DB in the schema import process
I''ve got a bunch of table creations in the schema.rb file and all is well. However, I have to manually go and create the db first. Is there a way (something like a create_database method) to get this to work? (execute "create database ..." didn''t seem to cut it either.) _______________________ Brad Eck Sr. Software Engineer Pelco 3500 Pelco Way Clovis, CA 93612
2005 Dec 21
1
Active Search
Issue: I am trying to get a good quality search capability across our site. I ran across ActiveSearch (http://julik.textdriven.com/svn/tools/rails_plugins/simple_search/) which seems to be a better solution for us than SimpleSearch (and SearchGenerator) as it is more than just word based. However, I am unable to get the project built and being fairly new to Ruby / Rails I''m a little
2006 Jan 11
1
Multiple apps on server conflicting
We have a situation where one app on the server seems to be affecting another. So, we start the first app on port 3000 and run it and all is well. We start the second app on port 3006 and it fails (blank screen). We then have to blow away the temp files and try again. If we start the 3006 one it will work and then start 3000 and it fails. So, in essence the first one wins. Any thoughts? We are in
2006 Jan 06
1
DHTML on WEBrick
I have some simple dhtml code in my rails app that hides fields I do not need displayed. This worked great as soon as I click on the item that initiates the hide, but within one second it pops back up. My assumption is WEBrick is refreshing to a previous state and I wondered what y''all thought was the appropriate way to handle. I thought maybe the default environment in production would
2006 Jan 10
1
Frames
Well, I know there''s a better way (not using frames) but bear with me while we get rev 1 out the door and then switch. In the meantime I need to redirect from one frame into another and cannot for the life of me figure out a reference to get to another frame: redirect_to :controller => testController'', :action => testProc'' I cannot seem to add :target or
2005 Nov 14
3
InPlaceEditor question
I''ve noticed some strangeness when using the InPlaceEditor. Here''s my code: <p id="storyTitle"><%= storyTitle %></p> <script type="text/javascript"> new Ajax.InPlaceEditor(''storyTitle'', ''editBlog.jsp'', { callback: function(value) { return ''v=edit&user=<%=
2005 Jan 24
1
.call file creation
I am curious partly because it has occurred randomly in my asterisk system. How does one go about creating a .call file for placing a call between two extensions/phones? I know this has been mentioned and is probably in one of the wikis somewhere, but I am unsure exactally how to go about doing it. Can anyone point me in the right direction. Dan
2006 Mar 28
2
Fastest way of adding " " around multiline text in RADRAILS
lets say i have the following SQL in my database editor : When i paste it into rad rails i have to add quotes and the ''+'' symbol to the end of each line. It is very tedious. What is the best method? select timesheets.employee, sum(items.hours) as hours, sum(items.hours*timesheets.cost) as cost, sum(items.hours*timesheets.charge*decode(activities.chargetype,0,1,0)) as charge,
2006 Sep 28
15
Inserting rows into linking table
Hi, I have two objects: Contacts Lists I want to be able to add multiple contacts to multiple lists. I''ve created a linking table and a form that allows me to select the contacts using checkboxes, but I''m having some problems with the controller and model. I receive the following error message when I submit the form: Mysql::Error: Cannot add or update a child row: a
2006 Mar 07
6
fcgi dispatcher crashing
I''m trying to set deploy an app on apache2 with the fcgid module, but can''t seem to get anywhere. Things work fine with cgi, but when i switch to fcgi, i''m stuck with a ''503: Service Temporarily Unavailable''. There''s no error being logged anywhere, afaik. Trying to run dispatch.fcgi from the shell doesn''t work either. It bombs out,
2006 Aug 15
4
observe_form not serializing form
I want to use observe_form to automatically save notes in a text_area. This is the code I have: <form id=''notes_form''> <%= text_area :contact, :notes, :cols => 40, :rows => 10, :id =>''notes_text_area'' %> <%= observe_form(''notes_form'', :frequency => 1,
2005 Dec 21
0
subscribe
_______________________ Brad Eck Sr. Software Engineer Pelco 3500 Pelco Way Clovis, CA 93612 Office - 800-289-9100 Email - beck@pelco.com <BLOCKED::mailto:beck@pelco.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20051221/107d6e92/attachment.html
2006 Sep 18
5
Undefined method "updated?"
I recently updated Rails to the latests version, and one of my existing apps broke. More speficially, it can''t find the method "updated?" when it is attempting to call it on one of my models. The stack trace follows: NoMethodError undefined method `updated?'' for #<MyModel:0xc91d50>
2006 Jun 15
6
Newbie''s problem with a nil object he didn''t expect!
Dear Rubyists/Rails gurus, Though I''ve successfully completed the various Rails tutorials online and the Depot application from the Agile Web Development with Rails book, I''m still pretty much a Ruby/Rails newbie. I''m trying to learn by writing my own simple blogging application, but I''ve run into a problem that has had me scratching my head for a few days now.
2006 Jan 05
7
HOWTO: Combine fields from 2 two tables in 1 object
Hi all, For a dropdownlist (showing "Company - FirstName Lastname'') I want to fill an object @project_contacts with "Name" from table Companies and "Firstname" and "Lastname" from table contacts. Any idea? Regards, Gerard. -- "Who cares if it doesn''t do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS
2006 Aug 02
2
Self-Referential has_many :through
Hello all. I am trying to create a self-referential has_many :through. I used the following site as a guide http://blog.hasmanythrough.com/articles/2006/04/21/self-referential-through but it still doesn''t appear to be working. I have two models. Person and Relationship. A person has many contacts (Which is another person) through relationships class Person < ActiveRecord::Base
2008 Jun 06
2
joining tables
Hi I have 3 tables as 1) user_groups id | contact_id | group_id | group_user_type_id 2) contact id | name_first | name_last | 3)contact_email_addresses contact_id | contact_email_address_type_id | emailaddress Now I have group_id sa for example 68 What I want is from contact_email_addresses table get all the emailaddress with contact_email_address_type_id=2 for the contacts
2010 Jul 23
2
re-ordering bwplot
Dear list: I'm using bwplot to compare concentrations by location and treatment as in: # using built in data bwplot( conc ~ Type : Treatment, data = CO2 ) I would like the order of the plots to be: 3,4,1,2. I can't seem to figure this out with index.cond or permc.cond. Any help is appreciated! Brad Eck [[alternative HTML version deleted]]
2005 Mar 10
7
upgrade question
Hi, I''ve upgraded my shorewall version from 2.0 to 2.2.1 using the .tgz I followed the instructions for upgrade and got a warning when running shorewall check on /usr/share/shorewall/action.DROP and action.Reject using "dropNonSyn" while that has changed to DropNotSyn . I manually copied over action.DROP from the source tree. Question: Are there more files to check ? Even
2005 Jul 07
8
Mass mail performance
How does Action Mailer perform when sending out say 3,000 emails? I know the answer will have a lot to do with the hardware, but in general, is Action Mailer up to the task of completing an operation like this in reasonable time?