similar to: Relationship not working

Displaying 20 results from an estimated 7000 matches similar to: "Relationship not working"

2007 Sep 14
0
deal with Controller and Action logic in RJS?
The question is, should we deal with Controller and Action logic in the RJS file? If so, is it quite "spaghetti-like"? This is actually for the Agile Web book Shopping Cart example: If the user clicks "Remove Item" and we do it the AJAX way, what if we want to first show the cart''s content as 0 x Pragmatic Version Control $0.00 and then highlight
2006 Mar 02
7
The no-framework PHP MVC framework
"The no-framework PHP MVC framework" http://toys.lerdorf.com/index.php?url=archives/38-The-no-framework-PHP-MVC-framework.html Yuck! What spaghetti code. I can''t ever imagine preferring that to Rails. Joe -- Posted via http://www.ruby-forum.com/.
2006 Feb 08
1
Adding children via small subform
I''ve read AWDR and especially the part concerning adding child line_items to an order. Unfortunately I want to do my process in reverse and in doing what I thought would work I get a null object error when trying to append the children to the parent. This is a _major_ stumbling block in my Rails use as almost every one of my projects has needed this so its a pretty vital problem I need
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
2007 Dec 02
3
Better way for select list for belongs_to?
I''m currently doing all of this just to have a drop-down list of Courses for a particular student: ===== edit template ===== <%= f.select :course, @courses, :selected => @student.course.id %> =================== ===== students controller ===== def edit @student = Student.find(params[:id]) @page_title = "Edit #{@student.full_name}" @courses =
2006 Apr 20
4
Question about Associations
Hi all. Got a stupid-simple question about associations. I have two models - school and course. There are a fixed number of schools (set up in the migration). Each course is assigned a school and a school will be associated with multiple courses... How do I set up the associations? Do (can) I have School :has_one :course and Course :has_many :schools? Does the schools table then get a course_id
2006 Jan 06
1
Insert to associated table question
Hello Friendly Gurus, I have a volunteers table and an hours tables. I''ve edited the respective models to have: "hours belongs_to :volunteer" and "volunteers has_many :hours". My problem is, I don''t know how to set the volunteer_id column in the hours table to the appropriate value so that hours will belong to volunteers. I''ve added the
2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
Hi All, just in a spot of bother with this gem, I am trying to create a new location and get the above msg. here is my controller: class LocationsController < ApplicationController # GET /locations # GET /locations.json def index @locations = Location.all @json = Location.all.to_gmaps4rails end respond_to do |format| format.html # index.html.erb
2010 May 14
1
color lines by group membership in spaghetti plot
Greetings, I am new to R. Right now I'm most interested in the spaghetti plots of achievement over time by student ID associated with longitudinal analysis. How can I do a spaghetti plot of all students, but color the lines by group membership such as gender or race, and indicate this color scheme in the legend? Any advice would be much appreciated. Jack Jack B. Monpas-Huber, Ph.D.
2006 Aug 01
0
Validation of facade columns
I''m having difficulty understanding how to make validation of facade columns consistent with validation of other active record columns. To illustrate this, I''m going to extend the facade column example discussed on pp. 284-5 of AWDR. Let''s say that there is a "rectangles" table that has width and height columns. For some unknown reason, width is stored in
2012 Apr 04
3
spaghetti plots in R
I would like to plat some spaghetti plots from my data , ma data is as follows ak[1:3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 0.3211745 0.4132568 0.5649930 0.6920562 0.7760113 0.8118568 0.8609301 0.9088819 0.9326736 [2,] 0.3159234 0.4071270 0.5579212 0.6844584 0.7684690 0.8243702 0.8677043 0.8931288 0.9261926 [3,] 0.3075260 0.3993699
2008 Jul 14
1
question about method "hidden_div_if" in AWDR 2
I followed the sample code in AWDR 2 like this: store_helper.rb def hidden_div_if(conditions, attributes = {}) if conditions attributes["style"] = "display:none" else attr = tag_options(attributes.stringify_keys) "<div #{attr}>" end end store.html.erb <%= hidden_div_if(@cart.items.empty?, :id => "cart") %> <%=
2006 May 21
2
Nooby partials / component problems
I''m stumped on what seems like should be a fairly easy thing, so I hope someone can point out my error. I wanted to show a few things on every page, so I added an application level template in "layouts". I added my styles in there, and put the controller name and action name into the TITLE tag for my own reference. So far so good - works like expected. Then I wanted to
2006 Mar 12
2
counter_cache reference/tutorial
I''m trying to use counter_cache, but I''m not doing something right. It is unreliable and I keep having to correct it manually. Is there a good tutorial or reference on how to use it on-line? I have the AWDR book, but I need something more complete. TIA, Jeffrey
2017 Jan 04
2
Amavis on Centosl help
I'm moving from Ubuntu to CentOS 7 Previously, on Ubuntu, installing amavisd would lead to etc/amavis/conf.d that contained: 01-debian 05-domain_id 05-node_id 15-av_scanners 15-content_filter_mode 20-debian_defaults 21-ubuntu_defaults 25-amavis_helpers 30-template_localization 40-policy_banks 50-user However installing amavisd on centos leads to a spaghetti config file (i.e.
2016 Apr 04
3
chgrp "Domain Admins" on folder return invalid group "Domain Admins"
Dear Samba users and admins, I am trying to deploy Samba4 as a domain controller and a file server and having some issues.* The domain have been well provisioned with option --use-rfc2307 I am then trying to create share by following this samba wiki https://wiki.samba.org/index.php/Shares_with_Windows_ACLs The problem is that i cannot succeed to change the group owner of the folder I want to
2006 Apr 10
2
using web service for authenitcation
I am writting a web service for authenitcation of users and was using web_service_scaffold :invoke for testing it out...and was able to consume it using .NET. But my question is, whats the simplest method using which i can use the same web service in the current Web App. I mean, not from an external application or something but from the current web apps itself. I found one method in AWDR, and
2016 Jun 30
3
integration of R and php in Fedora 24
Dear All, I am writing a project that will involve me writing code in R and php. i would appreciate if someone guide me on how to integrate R to php i wish to write an upload system in php that R will use and process and post back the result on php. thanks in advance ================ Worthy agent of Light ================ Jules Irenge MSc Student University of Liverpool [[alternative HTML
2006 Aug 11
3
General architechture / MVC question
Hi all, A newbie with Ruby on Rails - and programming in general - I''m working on a few Flash and PHP projects as well. Partly to make my work more efficient, partly to gain a better understanding of system architecture / design patterns, I''ve been trying to use the MVC pattern in database-backed Flash / Actionscript development as well. I think / hope that I''m
2011 Sep 03
1
Problem with by statement for spaghetti plots
Hi, I am trying to apply the example at the bottom of the following page to my own data: http://128.97.141.26/stat/R/faq/spagplot.htm http://128.97.141.26/stat/R/faq/spagplot.htm The code from the example is: /tolerance<-read.table("http://www.ats.ucla.edu/stat/R/faq/tolpp.csv",sep=",", header=T) fit <- by(tolerance, tolerance$id,function(x) fitted.values(lm(tolerance