Displaying 5 results from an estimated 5 matches for "rschumeyer".
Did you mean:
schumeyer
2007 Mar 29
2
has_many :through with :order?
Let''s say I have
class Student < ActiveRecord::Base
has_many :classes_students
has_many :classes, :through => :classes_students
end
I want the list of classes for each student to be sorted by the class
title.
I could get an array containing the classes and then sort it. But, I
would like for the database to do the work.
Is there some combination of :include and :order that
2009 Mar 31
2
TimeWithZone seems in rails 2.3 seems broken...is this the correct behavior?
My environment.rb contains
config.time_zone = ''UTC''
If my understanding is correct, rails should assume time values coming
from the database are UTC, and since config.time_zone is set to ''UTC'',
it should not try to convert the times.
Instead, rails is assuming that the db values are Eastern (my local
zone) and is incorrectly adding four hours to convert to
2007 Feb 15
0
Can I use an array with fields_for ?
Ok, I''ll try one more time...I''ve read the book, I''ve searched the docs,
I can''t find the answer this puzzle.
Surely someone can help!
@rs is an array, and I want to have a select field for each item in @rs.
How can I do this? The following (which is inside a form_for) does not
work:
<% for r in @rs %>
<% fields_for r do |f| %>
2007 Feb 16
0
Please help...passing arrays between controller and view
I have tried to get this question answered before with no success. I''m
getting desperate!
Here is a simplified description of my problem...
I have a many-to-many relationship between accounts and employees, with
a model table in between called AccountEmployeeRelations. There is
other stuff in this table, but I don''t think that matters for now.
In the controller I create
2007 May 15
1
link_to_remote with :confirm...need syntax help
What is the syntax to use :confirm with link_to_remote? This doesn''t
work, I''ve tried a few permutations, with no success:
<%= link_to_remote( "X",
:update => ''address_list'',
:url => { :controller => ''addresses'', :action =>
''destroy'', :id => address },