similar to: create and update with has_many :through

Displaying 20 results from an estimated 4000 matches similar to: "create and update with has_many :through"

2006 Aug 03
12
More than one has_many :through association between the same 2 models
I wonder if you can have more than one has_many :through association between 2 models. For example... I have a model Teacher and a model Class Now, 1 Teacher works in many Classes, right?. So I need a join model like class Work < ActiveRecord::Base belongs_to :teacher belongs_to :class end But I also would like to know if a teacher CAN teach a class before I
2015 Jul 13
2
Crear datos aleatorios con restriciones
Hola, Esta pregunta la hice en stackoverflow <http://stackoverflow.com/questions/31137940/randomly-assign-teachers-to-classrooms-imposing-restrictions/31143808#31143808>pero nadie pudo contestarla. 1. Quiero generar N escuelas, con G grados y C divisiones. 2. Quiero asignar cada uno de T maestros a 2 divisiones en un grado y escuela Si tengo C=4 divisiones, puedo lograr lo que quiero con
2015 Jul 13
2
Crear datos aleatorios con restriciones
Hola, 0. La falta de 'elegancia' hace que sea mas dificil hacer cambios al codigo. Por ejemplo cambiar n.classrooms <- 4 a n.classrooms <- 20 1. Cuando tengo solo 4 puedo hacer esto: schoolGrade$A <- Teachers$Teacher.ID[1:cuttoff1] schoolGrade$B <- Teachers$Teacher.ID[1:cuttoff1] schoolGrade$C <- Teachers$Teacher.ID[(cuttoff1+1):n.teachers] schoolGrade$D <-
2015 Jul 13
2
Crear datos aleatorios con restriciones
Gracias Carlos, Tu codigo es un gran paso en el sentido correcto pero no produce exactamente lo que estoy buscando. Mi "solucion" en stackoverflow <http://stackoverflow.com/questions/31137940/randomly-assign-teachers-to-classrooms-imposing-restrictions/31143808#31143808> produce un data frame `schoolGrade` con 240 observaciones y 7 variables. Mi objetivo es poder generar un data
2015 Jul 13
2
Crear datos aleatorios con restriciones
Perdon por no se lo suficientemente claro :( Tu codigo produce `validPairs` que tiene 7 variables y 360 observaciones. Donde > validPairs[1,] V1 V2 V3 V4 V5 V6 valid 60 e1 g1 c1 e1 g1 c2 Valid indica que un maestro tiene asignado c1 y c2 en la escuela e1 y el grado g1. Correcto? Si es asi, esto es casi lo que queira producir y creo que puedo llegar a donde quiero usando tu codigo de base.
2010 Nov 04
9
Delete action is not working and redirects to edit action
Hello, i have a strange problem here. I have made a teacher controller using scaffold. All actions work fine but the delete does not. When i click the delete link, it redirects me to the edit of this teacher. I have restarted the server and i have tried in firefox (i use chrome) but problem still remains. Here is the code from my view. <%= link_to(image_tag("/images/
2003 Jun 19
2
Fitting particular repeated measures model with lme()
Hello, I have a simulated data structure in which students are nested within teachers, and with each student are associated two test scores. There are 20 classrooms and 25 students per classroom, for a total of 500 students and two scores per student. Here are the first 10 lines of my dataframe "d": studid tchid Y time 1 1 1 -1.0833222 0 2 1 1
2006 Mar 25
1
Nuby: HABTM and drag-and-drop views
I have two tables that have a HABTM relationship: Teacher has_and_belongs_to_many Groups, and Group has_and_belongs_to_many Teachers. This is what I want: select a Teacher, and then drag Groups from one box to another to assign them to the teacher. Or, select a group, and drag and drop Teachers to assign them to groups. All using AJAX, (off course). Only problem is, I don''t know
2006 Aug 24
1
Strange permissions problems
I had this problem some last year and never got it figured out. Now it is bugging me. It seems that sometimes when a student writes his/her file to a directory, it will not keep the correct group. It puts his/her main group as the group owner and that fouls things up. Here is what I have. Unix Permissions /school 3777 admin.teacher /school/bhs 3777 admin.teacher /school/bhs/reese
2004 Jul 05
1
on the fly access and privilege determination
Hi, I have a active directory domain of windows 2000. inside AD i have three user groups. Teachers, students and administration. every user has his home directory created on the fly. the umask is 0022. now what i want is that apart from users accessing there home directories there should be some other folders too which they can access. like teachers would like to access the
2005 Apr 20
2
Has And Belongs To Many Validations
Here is the schema that I am working with: courses -> courses_teachers <- teachers I want to ensure that a teacher is not assigned the same course more than once. In other words, if I''m in the courses_teachers table as teaching Spanish 101, if someone tries to add that same teacher/course combination to the table again, it will not be allowed. I thought I could use something
2006 Jan 19
2
has_many :through
Has anyone had much experience using the new has_many :though options that are currently in Edge Rails? I''m looking at using it in my project but haven''t found much about it. Kyle
2006 Dec 06
2
same bitstream
Narrowband (8 kHz), wideband (16 kHz), and ultra-wideband (32 kHz) compression in the same bitstream What is the meaning of this? can i find more information about this somewhere? And what is packel loss concealment, an you enable this somewhere? thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Jan 03
1
factor names
Dear all I have a factor variable which holds values like "Engineer", "Doctor", "Teacher" etc. I would like to collapse those categories so that Teachers and Sociologists form one category named "Teach & Soc" etc. However, I do not know how I can do it. Recoding does not seem to work. Thank you Dr. Iasonas Lamprianou Assistant Professor
2008 Feb 06
1
How to have a Default Profile per group ?
Hello, My main question is : ? Is it possible to have a dedicated Default Profile per group ? ? The idea is to have a specified and prepared default profile for each groups we have. For the time being we've already had a "Default User/" directory in our netlogon directory which delivers a single and only fresh default profile. It's the same profile for everyone even if
2003 Oct 29
4
share permissions
I am trying to setup Samba in a classroom so that a student's samba folder can be accessed via Windows by the student and the teacher. I have Samba working, but can only get the student access to the folder. How can I add another user or group to Samba so the teacher and student have full control over the folder? Thanks Tom
2005 Aug 20
2
DFS question
Was wondering if someone could tell me if this is correct. I want to set up some DFS shares. I have 3 servers with SAMBA/LDAP on them. My first is basically my PDC and the other two are my BDCs. I assume that I will have to set all of this up on each server, so that no matter which server catches the logon, the logon script will get run. Also, if one of the servers was to go down for a
2015 Apr 05
2
Member server - winbind unable to resolve users/groups
On 05/04/15 16:11, buhorojo wrote: > On 05/04/15 17:03, Reindl Harald wrote: >> >> >> Am 05.04.2015 um 16:55 schrieb buhorojo: >>> We don't want best anything >> >> sad enough >> >>> We want what we have to work >> >> so do what you want - who cares >> >>> Linux: we configure it as we wish >> >> why
2015 Apr 06
6
Member server - winbind unable to resolve users/groups
On 06/04/15 12:37, buhorojo wrote: > On 05/04/15 19:41, Rowland Penny wrote: >> On 05/04/15 16:11, buhorojo wrote: >>> On 05/04/15 17:03, Reindl Harald wrote: >>>> >>>> >>>> Am 05.04.2015 um 16:55 schrieb buhorojo: >>>>> We don't want best anything >>>> >>>> sad enough >>>>
2007 Aug 06
3
Free sitting
Hello, How would you implement free sitting ? The idea is to offer teachers the ability to share the same desk and hardphone : for instance, Mr Foo is teaching mechanics on mondays while Mr Bar is teaching english on wednesdays. Each has his own extension but use the same hardphone. 1. Does a program check a calendar or database somewhere to allocate a phone to a user (as teachers schedules are