Displaying 20 results from an estimated 2000 matches similar to: "Bad merge of r5686 from trunk to 1.2-pre-release?"
2006 Dec 20
7
has_many :through does it support collection_singular_ids ?
Good evening list members,
I have the following model:
class Author < ActiveRecord::Base
has_many :authorships
has_many :books, :through => : authorships
end
Should I be able to do the following?
Author.find(:first).book_ids = [1,2,3]
I ask, because it doesn''t. The docs state that it should, but it
doesn''t specialise in the case of a :through
This
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
Folks,
I think I should start a new thread for this, because a similar one I
saw is a bit old and the resolution there doesn''t seem to apply to
what I''m running into now.
Anyway, my date_select calls are bombing on me with the exception:
----
ActionView::TemplateError (wrong number of arguments (3 for 2)) on
line #8 of entries/_dates_form.haml:
8: = date_select(
2006 May 03
2
Using a helper within another helper?
I am trying to push some view logic into a helper. The thought is that
this is a step towards having the business logic in the helper rather
than the view. However, I''m essentially wrapping the checks around an
eventual call to date_select(). The problem I''m having is that the
application complains that it doesn''t know about date_select(). I''m
sure (or
2006 Jul 13
3
date_helper megapatch and MultiparameterAssignmentErrors
Hello all,
There''s a great patch in trac that fixes a lof of issues with the
date helpers. I''m afraid it hasn''t had any attention yet.
http://dev.rubyonrails.org/ticket/3811
This fixes all the little date_helper problems, except one: When you
choose an invalid date ActiveRecord throws an
ActiveRecord::MultiparameterAssignmentErrors. This used to work in
1.0,
2007 Feb 04
2
Beginner Q: Keeping the Ruby on Rails platform up to date.
Hello, I recently installed the ruby on rails framework from this
tutorial:
http://www.hivelogic.com/narrative/articles/ruby_rails_lighttpd_mysql_tiger
So, I installed:
Ruby on Rails 1.1
Ruby 1.8.4
LightTPD 1.4.13
FastCGI 2.4.0
RubyGems 0.9.0
Readline 5.1
PCRE 6.6
FastCGI and MySQL bindings
I figured out how to keep my ruby on rails up to date by using the
command "gem update rails
2005 Oct 13
1
subsetting data frame using by() or tapply() or other
Ok so I see the problem that I'm having creating a new variable (LAG1DBC)
in the example data transformation below is that tapply() is creating a
list that is not dimensionally consistent with the data frame (data). So
how do I go from the list output of tapply() to create a dimensionally
consistent vector that can create the new variable in my original data
frame? I've been trying
2007 Feb 21
2
date helper bug?
I''ve found an issue when trying to use the time_ago_in_words and
distance_of_time_in_words from action view''s date_helper.rb
Using SQL Server, I have a datetime column that gets returned as:
"2007/02/21 09:54:00". When I pass this to time_ago_in_words (which
just passes on to distance_of_time_in_words) it miscalculates the
difference as "9 hours" (...um yeah,
2006 Mar 10
14
Oracle Date type errors rails on edit
I have a table with "expires_on" a DATE field.
"Show" and "Destroy" work, but "Edit" errors:
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:150:in
`select_hour''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:149:in
`select_hour''
It only happens when
2007 Jul 24
9
will_paginate plugin doesn't work with Association Extensions?
I have:
class Post < ActiveRecord::Base
has_many :comments do
def published
find( :all,
:conditions => {:published => true} )
end
end
end
When in my controller I do
Post.find(:first).comments.published.paginate :page => params[:page]
I get an error
undefined method `paginate'' for []:Array
Is will_paginate supposed to
2006 Jan 23
11
mysql dates
does anyone know of a way to make the date_helper deal with mysql dates with 00 values in them?
I have lots of dates that are like the following:
2005-04-00
2005-00-00
and I need to set null values in a date_select for elements that are 00. These are valid dates in mysql.
In the absence of an immediate solution to the above, I''ve been trying to find out how InstanceTag.new works so I can
Overriding date_select in local project to use custom value rather than blank for starting option...
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a
behavior similar to what you get using date_select with the
:include_blank => true option where the first value in the dropdown is
"- Month -", "- Day -", or "- Year -" rather than a blank value for
the respective month, day, and year select fields.
I took a look at the ruby source for
2006 Mar 15
1
Strange behaviour of dates
Imagine a crud app that tracks people applying for a loan, here is the
layout I have:
Mysql database:
create table apps (
id int auto_increment primary key,
primary_id int not null,
secondary_id int null,
constraint fk_primary_id foreign key(primary_id) references (contacts.id),
constraint fk_secondary_id foreign key(secondary_id) references
(contacts.id))
create table contacts (
Id int
2005 Oct 12
2
subsetting with by() or other function??
I think I must be missing something obvious, but I'm having trouble
getting a data transformation to work on groupings of data within a data
frame (csss3) as defined by 2 factors (population, locid). The data are
sorted by year within locid within population and I want to lag another
variable (dbc), i.e, shift them down by 1 row replacing the first row with
NA, within groups defined by
2005 Nov 04
0
RE: Why class InstanceTag is defined at 4 different places inRails
In Ruby you can add and modify existing classes at will simply by
reopening it. The 4 files you mention add functionalities to the
InstanceTag class. This is not a redefinition. The best part is that you
can do the same ! An easy way to overwrite an existing method or to add
new ones is to create a file under you rails application lib directory
and put in it the replacement you want to make:
2005 Mar 12
0
scaffolding issue
i''ve got a little rails app i''m messing with
the schema is
create table timedatevalidates (
id serial,
timedatetovalidate timestamp,
primary key (id)
);
the mvc was initialized using
rails scripts/generate scaffold timedatevalidate
i''ve got this in a subdir of webroot and have modified .htaccess and
config/routes.rb like so
.htaccess :
2005 Dec 01
0
Problem using a date helper
Hi,
I''m having trouble getting a date helper working. I was pointed to
this by Sean Allen, and it resides at
http://theredheadedstepchild.net/articles/2005/08/04/datehelper-fixes
It''s meant to fix the bug in Rails which doesn''t allow datetime_select
to properly discard the year.
So, I''m trying to use the helper''s time_select function.
date_helper.rb
2008 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys,
1. Which is the difference between this two methods? (select_datetime,
datetime_select)
2. How I assign the selected date-time values, to an specific variable
or array using select_datetime
I know do it using datetime_select(''object'',''method'')
I aprecciate your attention.
Thanks
PD: Sorry about my english.
2006 Oct 26
3
help fo finding R package "utils"
Sir I have a problem that from which country i can assess R package "utils"
for data entry for loading it in R
Please help me in this regard.
--
AMINA SHAHZADI
Department of Statistics
GC University Lahore, Pakistan.
Email:
amnakhan493@gmail.com
amna_989@hotmail.com
amna_989@yahoo.com
[[alternative HTML version deleted]]
2005 Mar 26
4
RGUI font problem (PR#7749)
Full_Name: Christos Hatzis
Version: 2.0.1 patched (2005-02-18)
OS: WinXP SP2
Submission from: (NULL) (24.61.19.101)
I had encountered a similar problem when changing the font in the R Console and
then then open the graphics device by plot(), the console window whites out.
this might be related to bug report 7271. I mentioned it sometime back and was
told is was not reproducible.
Now I have
2004 Sep 16
4
FW: How do I insert a newline in my title in a plot?
yes I have tries, and nothing. It just shows the strings with the slashn,
just like i typed it.
-----Original Message-----
From: Rashid Nassar [mailto:rnassar at duke.edu]
Sent: ÐÝì?ôç, 16 Óå?ôåìâñßïõ 2004 15:44
To: Christos Rodopoulos
Subject: Re: [R] How do I insert a newline in my title in a plot?
Have you not tried what you have already suggested:
title("this is a title\nIn 2