Displaying 20 results from an estimated 1000 matches similar to: "belongs_to confusion and some other questions - thanks!"
2006 Apr 11
3
model classes in different folders
Hello,
I have the following structure:
- app
- controllers
- helpdesk
- call_controller.rb (Helpdesk::CallController <
ApplicationController)
- models
- employee.rb
- department.rb (Department < ActiveRecord::Base)
- helpdesk
- call.rb
- call_history.rb (Helpdesk::CallHistory < ActiveRecord::Base)
Is it possible to have a relationship between
2006 Apr 28
1
rails + iis + virtual directory = desperation
Hello,
I''m getting crazy trying to configure a rails application under IIS in a
virtual directory. I have climbed highest mountains, I have run through
the fields, I have visited rails forums all over the world and I still
haven''t found what I''m looking for :(
I know this question has already had been posted here before, but I''m
desperate.
Does anybody
2006 May 25
7
Grouping controllers
I''m grouping controllers to avoid cluttering the top-level namespace.
First, I used script/generate Admin::Customers new edit show list and then I
used
script/generate Admin::Providers new edit show list.
The generator created the subfolders correctly: I have an admin folder and
inside there''s customer_controller.rb and provider_controller.rb.
I have the same structure in
2005 Jul 12
4
Calculation of group summaries
I know R has a steep learning curve, but from where I stand the slope
looks like a sheer cliff. I'm pawing through the available docs and
have come across examples which come close to what I want but are
proving difficult for me to modify for my use.
Calculating simple group means is fairly straight forward:
data(PlantGrowth)
attach(PlantGrowth)
stack(mean(unstack(PlantGrowth)))
2005 Nov 25
2
acts_as_list with 2 fields in the scope
Hi Railers,
I''ve got a Categories table.
I want it to act as a list within the scope of the parent_id AND the
site_id.
Categories table :
id
label
site_id
parent_id
So, in my Category class, I have :
acts_as_list :scope => ''site_id = #{site_id} AND parent_id = #
{parent_id}''
The problem is that when I try to move_up a Category with a parent_id
that is null,
2008 Oct 16
1
merge/combine data
Hi,
I have the following data imported from a csv file
user_id site_id name
1 1 11 februari
2 1 11 redbook
3 1 11 tips
7 3 6 sleep
8 3 6 monitoring
9 3 6 alarm
Which I would like to merge/combine into
user_id site_id name
1 1 11 februari,
2007 Nov 07
2
dates
Dear R users,
I am just starting with R and am currently needing a lot of help! Sorry if
I disturb you and thank you for your answers!!!
Here goes my question: How do I make R reconize my date columns as dates?
When I "summary" my table, the levels of my date column are completely out
of order.
Thank you again for this tip,
Marcia
--
View this message in context:
2009 Dec 17
2
mantel test and NAs
Dear R users,
I am having a problem performing the mantel test (both with functions mantel
{vegan} and mantel.test {ape}) due to I believe the presence of NAs on my
distance matrices, which look like e.g.:
NA
1 2
1 2 3
NA 4 5 6
and
1
1 2
2 3 4
5 6 7 8
Would any of you have a solution for that?
Thank you for much for your help!
Marcia Rocha
--
View this message in
2008 Jul 11
3
Start preferred RGui
Dear R users,
I have been having a problem since I installed the new versions of TinnR and
R on my computer (1.19.4.7 and 2.6.0 respectively). I used to open R by the
command "start preferred RGUI", on the "R" tab of TinnR's menu. But now,
since I updated both softwares (which was necessary for some compatibility
issue with Windows Vista), the path for my preferred RGui (
2007 Jan 04
3
TC again - now working on VPN traffic
Hi!
It''s me again bothering you guys, what I want to do is to give full
bandwidth to VPN traffic and limit the rest to 30KB/s (kilobytespersecond),
ok?
Here''s what I have:
tcclasses
##################################
eth0 1 1kbps 70kbps 1
eth0 2 1kbps 30kbps 2 default
eth1 3 15kbps 10000kbps 1
eth1 4
2006 May 23
7
self-referencing has_many
Having a devil of a time finding records in a self-referencing has_many
table relationship.
Everything is working find looking at the has_many and the belongs_to
relationship.
But, when I try to find all "orphans", records that are neither a parent
nor a child, I can not find a query that work in ActiveRecord.
This query works in MySQL:
SELECT * FROM templates
LEFT JOIN templates
2006 Apr 19
4
Weird Problem - probably a noob mistake
I was up late last night trying to find the cause of this, but I''m
stumped.
I have this relatively simple controller to load up a bio. It''s basicly
id, name, desc, type (I use STI).
class BioController < ApplicationController
layout ''layouts/singlepanel''
def index
@bio = Bio.find(:all, :conditions => [''site_id = ?'',
2017 Jun 12
2
plotting gamm results in lattice
Dear all,?
I hope that you can help me on this. I have been struggling to figure this out but I haven't found any solution.
I am running a generalised mixed effect model, gamm4, for an ecology project. Below is the code for the model:
model<-gamm4(LIFE.OE_spring~s(Q95, by=super.end.group)+Year+Hms_Rsctned+Hms_Poaching+X.broadleaved_woodland? ? ? ? ? ? ?+X.urban.suburban+X.CapWks,
2006 Jul 28
2
change url based on account name
Hi,
Is this possible
Can I specify a url ie
http://localhost/AccountName/:contorller/:action/:id
Where AccountName is should be a userName, which will lookup a siteId in
the database?
Whats the best way of going about this, is there somthing in the
routes.rb file I can change to get the account name into a variable?
Thanks for your help
jon
--
Posted via http://www.ruby-forum.com/.
2006 Mar 09
5
link_to_remote id or class
Can anyone out there tell me how to add a class or id property to a
link using link_to_remote? I''ve been banging my head on this for far
too long.
Thanks
Clint
2007 Nov 30
1
main plot title
Dear R users,
I am having a problem with the main title of a plot. I have written a
function returning a plot and I would like that the main title of this plot
shows actually the name of the dataset I have used. So, for instance: if my
dataset is called Chl, I would like that my plot to be entitled : "Raw
periodogram of Chl". I know the function "paste". I suppose I would be
2006 Oct 27
1
has_many with nullable foreign_key?
Is there a way to use has_many and have it operate like such?
select * from pages where site_id = #{id} or site_id is null
I know there''s finder_sql, but then I''ll lose the find_in_collection
goodness.
Thanks,
Joe
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2008 Jan 16
2
R and Vista
Hello R users,
I have been using R for a while on xp and have just updated my system to
vista. Have encountered some problems... First and main problem is that i
cannot make R recognize my own written functions by coping them into the
Rprofile.site on the etc folder. For some reason, this very useful tool
seems not to be working anymore. Could someone help?? Any other suggestion
to make R start
2017 Jun 12
0
plotting gamm results in lattice
Hi Maria
If you have problems just start with a small model with predictions and then plot with xyplot
the same applies to xyplot
Try
library(gamm4)
spring <- dget(file = "G:/1/example.txt")
str(spring)
'data.frame': 11744 obs. of 11 variables:
$ WATERBODY_ID : Factor w/ 1994 levels "GB102021072830",..: 1 1 2 2 2 3 3 3 4 4 ...
$ SITE_ID
2010 Mar 16
4
Windows 7 Issues
i have been trying to join my windows 7 machines in a samba domain, but it
aways fails.
I can join a windows 7 machine in a Samba domain. Then i have an error:
_netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting
auth request from client USER machine account USER$
But the machine joined. Then, when i will log in with an user, i cant do it,
and the same error is showed in the