similar to: Sorting through relationships

Displaying 20 results from an estimated 180 matches similar to: "Sorting through relationships"

2006 Aug 06
6
Having Problem w/ Agile Web Development book
I get this error ... NoMethodError in StoreController#index undefined method `salable_items'' for Product:Class and here is my store_controller.rb ... class StoreController < ApplicationController def index @products = Product.salable_items end def self.salable_items find(:all, :conditions => "date_available <= now()", :order => "date_available
2006 May 23
1
Extension to book login code: list of online users?
Hi. I''ve been, fruitlessly, trying to extend the login code from the Agile book. What I''m trying to do, is create a list of logged in users. My idea is to the list of sessions. However, many sessions seem to be outdated. I believe the best way would be to get a list of sessions that have been active in, say, the last 15 minutes. Question is: how can I do this? Any hints
2006 May 23
2
TextMate and Tabs
Hello Everyone ~ Recently I have been moving Rails files between Mac, Linux, and Windows. As many know the Windows Ruby version 1.8.4 doesn''t like tab characters. I know in TextMate on the mac you can replace your tabs with spaces from the Text > Convert menu, but is there a way to set it to do tabs with spaces instead as you work? The preferences do not seem to have such a
2008 Dec 12
1
recursive List extraction question
Dear all, I've got a list L <- list(L1 = list (foo = "bar" , SL = NULL ) , L2 = list ( foo = "bar" , SL = list (SSL1 = list (DF = data.frame(val = 21, foo = "bar") , DFOO = list(foo = "foo", bar = "bar") ) ,
2008 Nov 28
2
Webgen as a backend for a end-user friendly CMS?
Hi all, I just had the idea of using webgen as a backend for an end-user friendly CMS. Such an end-user would for example be someone who has no programming or computer skills that go beyond using M$ Word. After logging into a friendly, graphic-based admin area of the website (e.g. PHP or Ruby-based), he/she can easily create, change, delete menu nodes, text content, and do a lot of other
2010 Feb 26
3
Plotting a Trivial Matrix
Dear All, Consider a matrix (N x N) where each entry is either zero or one (can hardly get any simpler). Now, I would like to plot it as a 'chessboard' where every matrix entry is a black (1) or white (0) square. Whatever tool I use to plot it, it should not try to interpolate the data at all. I found some online references http://www.phaget4.org/R/image_matrix.html but probably I can
2007 Sep 07
7
Simple websites (no DB?) with Rails??
I have been learning Rails and building small things over the last several months. Question I have that has been surprising difficult to figure out is this (I know it seems somewhat nonsensical but ignore that). I recently started getting a few requests for basic website to be built, small businesses, stores, even individual people. How would one about doing such a thing using Rails? I may not
2012 Aug 22
3
Question concerning anova()
Hi I am comparing four different linear mixed effect models, derived from updating the original one. To compare these, I want to use anova(). I therefore do the following (not reproducible - just to illustration purpose!): dat <- loadSPECIES(SPECIES) subs <- expression(dead==FALSE & recTreat==FALSE) feff <- noBefore~pHarv*year # fixed effect in the model reff <-
2006 Jan 19
1
Relationships, relationships, relationships!
If I had my very own sweaty, wind-up Ballmer (http://www.ntk.net/ballmer/mirrors.html warning: mind-scarring video), that is what he would be saying: "Relationships, relationships, relationships!!" My unscientific polling of the traffic in #rubyonrails and here is that, second to deployment issues, this is the bigges FAQ for Rails: how to do relationship x in ActiveRecord. There seems
2004 Oct 28
1
polr versus multinom
Hi, I am searching for methods to compare regression models with an ordered categorical response variable (polr versus multinom). The pattern of predictions of both methods (using the same predictor variables) is quite different and the AIC is smaller for the multinom approach. I guess polr has more strict premises for the structure of the response variable, which methods can be used to test for
2006 Sep 14
1
acts_as_ferret with has_many :through relationships?
I am currently using acts_as_ferret to search on a Posts table (title and content fields). These posts also have tags (with has_many :tags, :through => :questions_tags). I can''t figure out how to get acts_as_ferret to work with that relationship and allow searching of title, content, And tags at the same time (with the ability to set boost as well). Can this be done? -- Posted via
2006 Aug 16
0
Testing has_many, :through relationships
Hi All, This is my first post on this list. I''m a developer working on the Central Coast of NSW, Australia and came across RSpec via Lachie who demoed RSpec on Rails at a Sydney rails user group meeting a couple of months ago. I''m loving the expressiveness of RSpec and can''t really see myself going back to Test::Unit. I''ve come across one oddity though. I
2006 Aug 03
0
autocomplete and one to many relationships
Hello, I am trying to get autocomplete to save record ID. I have to tables: Students and Departments. Students table has department_id field. Department table has 2 fields: id and name I set up belongs_to: and  has_many: entries in the models of each. In my _form.rhtml I have the autocomplete line that is working: &lt;%= text_field_with_auto_complete :department, :name %&gt; ie.
2006 Aug 04
0
Fwd: autocomplete and one to many relationships
Hello, I am trying to get autocomplete to save record ID. I have to tables: Students and Departments. Students table has department_id field. Department table has 2 fields: id and name I set up belongs_to: and  has_many: entries in the models of each. In my _form.rhtml I have the autocomplete line that is working: &lt;%= text_field_with_auto_complete :department, :name %&gt; ie.
2006 Aug 04
3
forms and relationships
i''m still pretty new to rails, and while i''ve been able to hack my way into having it do what i want so far, i''m not happy with the way my code looks. on top of that, i''m sure that what i''m doing prlly isn''t the most efficient either. one of my biggest problems is probably to do with using relationships and forms together. i''ve
2006 Aug 12
0
issues with relationships and multiple objects on one form
Hello, 1. I have a form that edits a User and a Person at the same time. The controller is for the User. Everything works fine, except the fields that are populated by the Person fields lose state when validation fails. Do I use params to populate the user? I have tried a bunch of combinations with no luck. 2. The same users table has an integer column called
2006 Aug 15
0
has_many relationships and minimums
Hi, New to Rails and the list. Quick questions regarding has_many relationships that require at least 1 child. I''m aware of validate_size_of and use this to make sure that the parent is not saved without at least one child. Question is, is there some Rails magic to help when removing children to ensure the last one is not removed? Currently I''m calling something like this in my
2006 Aug 16
0
2 models with multiple relationships
I am in the middle of building YARELS (Yet Another Real Estate Listing Site), and here is one of my issues with model relationships. I have to core models and DB tables: User Property Here are the relationships I need to express: A user can have many properties that he owns (he is the seller) A user can have many properties on his favorites list (he is a buyer/seeker) A user can have many
2006 Jul 03
0
Modelling Relationships as objects
DHH in Rails Confeerence pointed out that abstract relationships should be converted into concrete objects, CRUDying up relationships. An example would be class User < ActiveRecord::Base has_many :subscriptions has_many :news_categories, :through => :subscriptions end class NewsCategory < ActiveRecord::Base has_many :subscriptions has_many :users, :through => :subscriptions
2006 Jul 14
0
Visualizing relationships between controllers and views
Hi, Someone put me on to the Rails Application Visualiser http://rav.rubyforge.org/ Which is quite handy for visualizing how things in the application are related, but I''m interested to know if there is something similar available to deal with visualizing the relationships between views and controllers. It''d be really useful to find a way to see all the various views,