Displaying 20 results from an estimated 4000 matches similar to: "Noob Question about databases in rails"
2005 Dec 07
1
Navigation
Greetings,
I appreciate the help from here as I seem to be asking the noob
questions a lot, but what is a good way to deal with navigation pulled
from a database?
I have this in my view:
<% @nav_buttons.each do |nav_button| %>
<li><a href="#" class="nav"><%=h nav_button.name %></a></li>
<% end %>
this in my controller
def
2005 Dec 17
13
Rookie with ActionMailer
To start out I''ll say that this is the first thing that I''ve ever built
that''s been intended to programmatically send email. I''m looking at
examples in AWR and also on the wiki. I feel that I sort of have things
set up right but I''m getting an error I can''t grok:
Net::SMTPFatalError in Home#email_list
550 5.7.1 Unable to relay for
2006 Jun 09
2
Noob with Overwhelming Deployment Woes...
I''m doing some searching for deployment options, and I feel like I''m
getting buried in a lot of new technology and assumptions that I know
all that it''s dependent on. In the past I''ve done small things with PHP
where I just dump the app in a folder and everything works out of the
box.
I found that everyone is using Capistrano, which relies on Subversion
2012 Sep 04
5
Associations and Math between Models
I''ve setup two models, 1 and 2, that are associated by
has_and_belongs_to_many. I''m trying to get an attribute from model_1 to use
in a method in model_2. When I use the code below, I get an error saying
''undefined method model_1_id''. What am I missing? Thanks!
Model_2.rb
Class Model_2 < ActiveRecord::Base
...
has_and_belongs_to_many :model_1
def
2006 Jan 11
0
NOOB - How do I query other databases for data
Hi All,
I''m trying to wrap me head around how I could use Rails for a particular
app that I''ll be designing that involves multiple legacy databases that
I''ll need to query and update. Basically, it''s a financial services
type of app where a customer will log in and be able to check/manage the
varied types of accounts that they have. Sounds simple enough
2006 May 15
1
handling navigation tabs - use sessions?
I think this is a fairly easy question done several times in several
languages, but on a traditional ''tab'' based navigation webpage, what''s
the best way to handle the active state?
I am using this in my view:
<% for category in @categories %>
<% if the condition is met to make this the active tab %>
<li><a id=''active''
2005 Aug 15
1
error in predict glm (new levels cause problems)
Dear R-helpers,
I try to perform glm's with negative binomial distributed data.
So I use the MASS library and the commands:
model_1 = glm.nb(response ~ y1 + y2 + ...+ yi, data = data.frame)
and
predict(model_1, newdata = data.frame)
So far, I think everything should be ok.
But when I want to perform a glm with a subset of the data,
I run into an error message as soon as I want to predict
2006 Jun 15
9
MySQL error
Greetings, I''ve got a Rimu account and I''m trying to config things for a
deployment. I''ve now got things to where I''m atleast getting a nice
error page you can see at:
http://www.juiceboxmedia.ca/public/
the username and password I have connects to this database fine with
phpmyadmin from my plesk control panel, so as far as I know MySQL on
it''s
2006 Aug 26
1
problems with loop
Dear all,
I am trying to evaluate the optimisation behaviour of a function. Originally
I have optimised a model with real data and got a set of parameters. Now I
am creating simulated data sets based on these estimates. With these
simulations I am estimating the parameters again to see how variable the
estimation is. To this end I have written a loop which should generate a new
simulated data
2005 Aug 16
1
predict nbinomial glm
Dear R-helpers,
let us assume, that I have the following dataset:
a <- rnbinom(200, 1, 0.5)
b <- (1:200)
c <- (30:229)
d <- rep(c("q", "r", "s", "t"), rep(50,4))
data_frame <- data.frame(a,b,c,d)
In a first step I run a glm.nb (full code is given at the end of this mail) and
want to predict my response variable a.
In a second step, I would
2006 Jul 28
2
negative binomial lmer
To whom it may concern:
I have a question about how to appropriately conduct an lmer analysis for negative binomially distributed data. I am using R 2.2.1 on a windows machine.
I am trying to conduct an analysis using lmer (for non-normally distributed data and both random and fixed effects) for negative binomially distributed data. To do this, I have been using maximum likelihood,
2009 Aug 05
2
MySQL noob question: Where can I find the database when I create one?
See my screenshot of the command here.
http://a.imagehost.org/0843/mysqladmin.png
When I type the following:
mysqladmin create <database_name> --user=root --password=xxxxxxxx
Is my command executed simply by pressing "Enter" after the command?
Am I missing some syntax?
If the command has been executed , what directory can I find this
database?
How does this relate to MySQL
2006 May 12
11
Stupid? question about if else logic
this seems so stupid, I keep thinking I''ve dealt with this before but I
have this code
<h1>Portraits</h1>
<% if @image.portrait == 1 %>
<%= image_tag(url_for_file_column ''image'', ''file'', ''thumb'') %>
<% else %>
<h1>Landscapes</h1>
<%= image_tag(url_for_file_column
2011 Mar 02
3
haml to erb - does it work with new html5 tags?
Hi,
I wanted to covert all my erb over to haml, but I use HTML5 tags like
nav, section, article, etc. Any idea if this is supported by haml?
Checked out their site, nothing mentioned there or did I miss
something. Sorry noob here.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2009 Mar 18
1
error with effects package.
Dear R helpers,
I have the following model
model_1<-glm(y~A+B+C+E+A:D,contrasts=list(D=contrasts_D),data=mydata,na.action=na.omit)
with: options(contrasts=c("contr.sum", "contr.poly"))
A,B and E are 2-levels factor,
C is covariate,
D is 20 levels factor with 10 in relation with the first levels of
factor A, the other in relation with the second levels of factor A
2009 Jun 26
1
Alternate error structures in lme4?
Hi R users,
The nlme library enabled several alternate error structures useful for
longitudinal or repeated-measures data. For example, a continuous AR(1)
process:
model_2 = update(model_1, correlation = corCAR1(form = ~ time | subject))
Does anybody know if this is available in lme4?
Thank you
Ben
--
View this message in context:
2006 Jun 13
7
help with ''error_messages_for''
Greetings,
I''m in the throws of deploying an app on site5, and I''m getting strange
errors. I think I might need to understand how error_messages_for
works.
I get a pretty standard looking error:
"
You have a nil object when you didn''t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occured while evaluating nil.errors
Extracted
2006 Jan 24
2
Noob - port 3000 in URL''s - get rid of it?
Hi, total Noob here.
I have a rails server set up and running. I''m working my way through
the "agile" book.
I see that all of the examples show URL''s that explicitly call for port
3000. How would one go about creating a ruby app that is engaged with a
"normal" URL with no port number in it?
That is apparently the default port for webrick to start up on
2008 Jan 18
1
Noob question for wxMenu.get_menu_items()
How do I iterate through the pseudo-template list class containing
wxMenuItem pointers.
Am still a bit of a Ruby/wxRuby noob.
Currently have this:
pp mymenu.get_menu_items()
which prints:
#<SWIG::TYPE_p_wxMenuItemList:0x4634fa8>
However when I try to do:
mymenu.get_menu_items().each {|key| ...} it tells me there is no each
method for this class (SWIG::TYPE_p_wxMenuItemList)
2012 Oct 16
1
XTS Subsetting question (noob)
Hi,
How can an xts object be subset using a date in a variable?
E.g. in below, what is the right syntax for Q to get the same value as P?
Obviously the syntax shown below doesnt work...
V is an xts object.
d = "2007-01-01"
P <- V['2007-01-01/']
Q <- V['d/']
Thanks,
J
--
View this message in context: