similar to: Multiple Keys in a Database Table

Displaying 20 results from an estimated 1500 matches similar to: "Multiple Keys in a Database Table"

2012 May 10
6
Is it suitable using STI?
I have problems on a simple design problem. I have many companies. Each company have one or more commercial activity. Activities types are: ecommerce, local unit, television, automatic vending machines, and so on. Company may have one or more ecommerce activity or one or more local unit activity, one ormore vending machines, etc. How can I model this scenario? Company has_many ecommerce has_many
2007 Mar 01
0
Reshape data
I have two data frames with a number of common variables that I wish to put into "long format". The first contains the variables es(Csales) [1] "terr" "Dec.02" "Jan.03" "Feb.03" "Mar.03" "Apr.03" "May.03" "Jun.03" [9] "Jul.03" "Aug.03" "Sep.03" "Oct.03"
2006 Mar 19
1
some strange behavior for has_many with STI
Hi all, I''m having some trouble with a has_many association on a table using the single table inheritance model that I''m hoping someone can help me with. The schema for the table is: CREATE TABLE `comments` ( `id` int(11) NOT NULL auto_increment, `user_id` int(11) default NULL, `type` varchar(20) NOT NULL default '''', `type_id` int(11) NOT NULL default
2006 Jul 21
1
Partial, Table Layout, Multiple Controllers/Models... DRY?
Hi, I am almost embarrased to ask this and I am sure it has been answered previously but the search feature is down on ruby-forum so I am not finding the answer. I have several controllers (leads, orders, activities, etc...). I have a ton of repeated html in each of the views for these controllers. For example, my list view has the same table/tr/td and for..in type of code and it just
2007 May 22
3
can I use acts_as_list with a has_many :through association
I''d like to be able to use a has_many :through association and treat the associations as a list but I''m getting this error when I try an use an acts_as_list method: NoMethodError: undefined method `move_to_bottom'' I''m using edge rails r6786. Here are my domain rules: Activities are things students can do. Units consists of a sequenced list of
2005 Nov 19
3
Form values not included in submit when ajax generated.
Hi. I have a form with two select lists, named ''project'' and ''activity''. The content of the ''activity'' list is changed when the selected item in project changes, using ''observe_field'' where project is observed, and a div enclosing ''activity'' is updated. This works as expected. The problem is that when
2007 Jun 22
1
nested rest URL => passing param from select
Hi, I''m trying to create a select box with an onchange event. When onchange is fired, I want to redirect to a nested rest url. The problem is that I don''t know how to pass the selected value to the url: <select id="category" onchange=" <%= remote_function(:url => category_articles_path(selected value?) ) %> "> Any suggestions? -- Posted
2013 Nov 08
2
Export CSV
Hi friends, i am using csv export on my application. in my view file code is <%- headers = ["Transaction ID", "Activity ID", "Product Name","Customer Name", "Ticket code"] -%> <%= CSV.generate_line(headers).strip %> <%if !@trans.nil? && @trans.length > 0 %> <% @trans.each do |tran|%> <% if
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,
2016 Mar 23
7
[PATCH v4 0/6] tests/qemu: Add program for tracing and analyzing boot times.
v4: - Lots more analysis of the /init script and other parts. - Display a list of the longest to shortest activities. - Rebase on top of current head. Rich.
2008 Feb 25
4
Using group in with find in an ActiveRecord appropriately
I''m playing around with the Practical Rails Projects code, and was attempting to make a change for graphing data differently using groupings. Basically the code went from: total_weight = @exercise.activities.collect {|e| e.repetitions * e.resistance} workout_dates = @exercise.activities.collect {|e| e.workout.date.to_s} To: total_weight =
2006 Oct 27
6
Table naming conventions
Folks, I am new to rails. I have tried Google searches, checked the tips and doco and can''t find the answer to a simple question. I have a table called "Activity" that I want to rename so I can use RubyOnRails but I don''t know whether the plural form should be "Activitys" or "Activities". Can someone illuminate me on what to do? regards Simon
2010 Nov 02
3
Using R for Production - Discussion
Hello Group, This is an open-ended question. Quite fascinated by the things I can do and the control I have on my activities since I started using R. I basically have been using this for analytical related work off my desktop. My experience has been quite good and most issues where I need to investigate and solve are typical items more related to data errors, format corruption, etc... not
2004 Jan 06
5
Logging user activities
Hello, What do you recommend for keeping track of user activities? For preserving bash histories I followed these recommendations: http://www.defcon1.org/secure-command.html They include using 'chflags sappnd .bash_history', enabling process accounting, and the like. My goal is to "watch the watchers," i.e. watch for abuse of power by SOC people with the ability to view
2007 Sep 05
7
Can asterisk give half-ring periodically for MWI?
Hi all, Configuration: Analog phone connected to TDM400p. I'd like the phone to give a half-ring (chirp) periodically when there is a message waiting. Can this be done? How is it configured? The visible "Message waiting" indicator and the stutter dial tone are working fine, but are not sufficient for me. Thanks!
2008 Dec 15
3
Fukuoka Ruby Award--about $10,000 for first prize
I am working with the Government of Fukuoka, Japan to get the word out about the Fukuoka Ruby Award to Ruby developers in the US. It is free to apply for this award. The top prize is about $10,000. Deadline is December 25, so there is not much time, but the application is fairly simple for developers who have existing projects. Here are the details: Fukuoka Ruby Award
2013 Mar 30
1
How to use group in nested associations
The below query fails: Timesheet.joins(:time_entries).select("timesheets.*, sum(time_entries.worktime) as total").group("timesheets.start_date") The models have the following relations: Timesheet < AR has_many :activities, dependent: :destroy, inverse_of: :timesheet has_many :time_entries, through: :activities accepts_nested_attributes_for :activities,
2016 Mar 22
19
[PATCH v3 0/11] tests/qemu: Add program for tracing and analyzing boot times.
Lots of changes since v2, too much to remember or summarize. Please ignore patch 11/11, it's just for my testing. Rich.
2012 Apr 14
7
undefined method `model_name' for NilClass:Class
Hi guys, I just started using Ruby on Rails. After implementing the RoR blog tutorial I started with my own data model. Sadly I am not able to get my create page running. Model: class Activity < ActiveRecord::Base validates :activity, :presence => true validates :forKids, :presence => true validates :start_date, :presence => true end Controller: class ActivitiesController <
2006 Dec 19
1
Software for monitoring user activities
hey friends, We are running 2 Centos servers 4.0 and 4.4 in our office for various activies like Mailing, Web Services, Database, CVS, FTP,Samba, Squid etc. We have about 100+ users on those servers , many users don't have shell on these servers (/sbin/nologin set as default shell) and some has shell (/bin/bash). We want to monitor the user activities of those users who have shell means