Displaying 20 results from an estimated 900 matches similar to: "change url based on account name"
2006 Jul 28
2
Delete has_many_and_belongs_to_many relation
Hi there,
Just a simple question I guess, but I am unable to find an anwser...
How to delete a hmabtm relation?
Any help will be appreciated :)
Thanks,
Fabrice.
--
Posted via http://www.ruby-forum.com/.
2005 Jul 07
2
raid5 crash
hi,
after we switch our servers from centos-3 to centos-4 (aka. rhel-4) one
of our server always crash once a week without any oops. this happneds
with both the normal kernel-2.6.9-11.EL and
kernel-2.6.9-11.106.unsupported. after we change the motherboard, the
raid contorller and the cables too we still got it. finally we start
netdump and last but not least yesterday we got a crash log and a
2006 Aug 12
5
In place editing on a list - not passing ID through
I want to do in-place edits on a list of data, but I''m having trouble
getting the ID passed through to the controller.
I use this in my view to create the field:
<% for frame in @frames %>
...
<%= in_place_editor_field :frame, :price %>
<% end %>
and this produces the following in my output:
<span class="in_place_editor_field"
2006 Jul 31
2
ambiguous column name in has_many :through
In my application model I have three classes: Accounts, Projects, and Items
class Accounts < ActiveRecord::Base
has_many :items, :through => :projects, :source => :items
has_many :late_items, :class_name => ''Item'', :through => :projects,
:conditions => [''due_on < ?'', Time.now], :source => :items
end
class Projects <
2006 Jul 27
7
''remember me'' using cookies
I''m about to implement this, and I''m thinking of storing the user''s id and
their hashed password in the cookie after a successful authentication.
can any see an obvious security issue with this? I know the method is
vulnerable to cookie theft but am i missing anything?
thanks
alan
2006 Jul 31
7
Problem with routes when I move the app to a different machine
Hi all:
I have an application that runs great on my macbook pro, however, when
I move the app to the production linux box, all routes fail except for
the one I set up as the default:
map.connect '':controller/:action/:id'', :controller => "Employee",
:action => "status"
I made sure the shebang line in dispatch.* was set to be OS
independent
2006 Jul 31
2
RJS: hide element problem
Hi,
I am trying to hide a "intro" text shown to user the first time after he has
made a search, in the website with RJS/Prototype "hide".
I get the following error:
RJS Error:
Type Error: element has no properties.
The text I would like to hide is in a div called "intro" and in my RJS I
tried:
- page.hide[:intro] as well as
- page.hide ''intro''
2007 Oct 11
4
Specifying geographic related facts
Let''s say I have two different geographic sites. They are pretty much
identical ie. each site has a machine called web1 which is a web server,
etc. Except there are couple site-specific settings ie. outgoing DNS
servers are different, SSL certs are different etc.
On the puppetmaster I can put in a file called e.g.
/etc/sideid
which would uniquely identify a site ie. siteX or siteY.
2006 Aug 01
1
Getting nil when you want "" (a blank string)
This has got to be something obvious that I am missing...
I have a remote form that has one value that is passed back to the
server from a text field. The form has a set of parameters passed to the
:url key called search_params. When the field is empty and the form is
submitted, I get
:my_val => ""
as expected when I examine the log. All is well with the world.
I need call that
2006 Jul 28
4
add one month or one year to a date
Hi,
I need to be able to add one month or in some cases on eyear to a Date.
Does anyone know of any easy ways of doing this?
thanks
scott
--
Posted via http://www.ruby-forum.com/.
2006 Jul 28
6
STRFTIME() why is it not defined
I am trying to take the input from a field in wich the user enters a
date, and formatting it to my time format
if params[:gotcha] != ''''
gotc = params[:date].to_a
gotc.strftime("%m/%d/%y")
end
Yet I get this error:
NoMethodError in AddController#add
undefined method `strftime? for ["00000"]
What''s wrong. I''m positive this method is
2008 Dec 09
1
expected variable name error pos 98349 WInBUGS in R
> I am using a random intercept model with SITEID as random and NAUSEA as
> outcome.
>
> I tried using a dataset without missing values and changed my model
> statement accordingly but still get the same error. Follwoing in an excerpt.
> > anal.data <- read.table("nausea.txt", header=T, sep="\t")
> > list(names(anal.data))
> [[1]]
> [1]
2008 Dec 08
1
Reading txt file in R to run Random Intercept Model
I am using a random intercept model with SITEID as random and NAUSEA as
outcome.
Thanks.
Anamika
I tried using a dataset without missing values and changed my model
statement accordingly but still get the same error. Follwoing in an excerpt.
> anal.data <- read.table("nausea.txt", header=T, sep="\t")
> list(names(anal.data))
[[1]]
[1] "SITEID"
2006 Jun 29
1
lmer - Is this reasonable output?
I'm estimating two models for data with n = 179 with four clusters (21,
70, 36, and 52) named siteid. I'm estimating a logistic regression model
with random intercept and another version with random intercept and
random slope for one of the independent variables.
fit.1 <- lmer(glaucoma~(1|siteid)+x1
+x2,family=binomial,data=set1,method="ML",
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)))
2006 Aug 01
3
Upload file to file system and sql insert date errors
I''m trying to use one form to upload a file to the file system
and insert a title and description field into the database.
I have no problem uploading files to the file system
using the code from
http://wiki.rubyonrails.com/rails/pages/HowtoUploadFiles
There are more fields on the form than need to be inserted into
the database, name and file.
I need to pull out these extra fields
2005 Apr 20
7
find_all_by and :order
I think I must be missing something obvious...
I have...
class OrderController < ApplicationController
model :order
scaffold :order
def list
@orders = Order.find_all_by_status(@params[:status], :order => "date" )
end
end
class Order < ActiveRecord::Base
belongs_to :customer
end
and i''m getting...
/Unknown column ''orderdate'' in
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,
2006 Apr 11
4
find(params[:id]) question
Admin Controller -
def show
@wizard = Wizard.find(params[:id])
end
View -
<td><%= link_to ''Show'', :action => ''show'', :id => wizard %></td>
URL -
http://localhost:3000/admin/show/1
I want user_name (one of the columns in the database) instead of the id
to show
For example: