Displaying 20 results from an estimated 40000 matches similar to: "Design Decisions"
2006 Jan 24
3
Merging two heavily referenced records into one
Here''s the situation: I have a "people" table whose "id" column serves
as a foreign key to several other tables (authorships, editorships,
members, users, etc.). Every now and then I will find two distinct
records in the "people" table that represent the same human being. They
generally differ by small differences in spelling but should really be
the
2006 Apr 10
4
Best way to propogate model rules to controller?
Hey everybody,
I''ve got a model that represents kind of a turn-based games. Certain
actions can only be made unders certain conditions. For simplicity,
we''ll say that the only condition for a particular action is that the
weekday be Tuesday.
def add_vote
raise ''You cannot vote today'' unless Date.today.wday == 2
...
end
In my controller I want to show a
2006 Jan 14
7
Application Design
Hi Railsers,
How do you design your applications? Do you start coding HTML? Start
with the controllers/models? Start in a program like
photoshop/gimp/illustrator/inkscape?
I start in inkscape, it''s a SVG editor. I sketch all the views of my
application, and then I create the views that belong to one controller
in RHTML. After that, I do the models/controller, and move on to the
2006 Feb 10
7
convert rails object to javascript variables
Am i a total idiot to try and parse out a rails object for javascript
in this way?
<%
for i in interface_items[0].attributes
%>
var <%= i[0] %> = "<%=h( i[1] )%>"
<%
end
%>
Am I missing something really obvious?
Thanks,
Mark
--
--------------------------------------------------------------------
I am Mark Daggett and I approve this message.
2006 Mar 16
23
AJAX on Mobile Internet Explorer
Hi!
I try to get AJAX running on a mobile Windows Mobile 5.0 based device
and failed. There should be a JavaScript support but nothing happens.
Have any of you experience with the rails javascripts on a this platform
or are there any hints, documentation on the net?
tia,
--
Daniel V?lkerts
Protected by Anti Pesto.
2006 Feb 21
3
AJAX sub-list
In the new / edit screen for an "item" I''d like to be able to add/remove
"sub-items"
on pressing an add button below the "sub-items" a bit of a form shows up
with the html looking something like:
<div id="uniqueid">
<!-- label etc here -->
<input type="text" id="sub_items[]" name="sub_items[]"
2006 Apr 30
82
Mongrel 3.15, Ubuntu and Park place (S3)
Hello. I installed under Ubuntu (Dapper) Park Place. I followed the
instructions given at the RedHanded site. I get the following mongrel
error when launching the application:
** Please login in with `admin'' and password `pass@word1''
** You should change the default password or delete the admin at
soonest chance!/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.5/lib/mongrel.rb:584:in
2006 May 01
2
Find by time?
I''m trying to find events created after an initial date. I''m sure it''s
something obvious, but I''m not sure why this isn''t working:
def self.find_recent
find(:all, :conditions=>"created_at > #{Time.local(2006, 4, 27, 22, 0, 0)}")
end
Time for more caffeine for me...
2006 Mar 26
2
Shared Columns in an STI
I have a an STI table which acts_as_tree, that has a large number of
classes/types. My common fields are:
id
parent_id
name
description
with 4 more text fields, I could cover most of my classes if I could
redefine the name of the field like this.
text1 AS address1
text2 AS address2
text3 AS zipcode
For one class and
text 1 AS model_number
text2 AS vendor
Is there a construct that will allow
2006 Apr 02
6
Neat style trick
Not terribly exciting, but I was happy to think of it.
I needed a div with a fixed height that could vary depending on page
content.
So I did this:
<div class="listcntnr" style="height: <%= @users.size / 2 * 125%>px">
Whee!
--Al Evans
--
Posted via http://www.ruby-forum.com/.
2006 Feb 14
2
AJAX on page load
Ok, I''m missing something obvious but after some reasonable looking in _The_
Rails book (sorry haven''t gotten the cookbook yet) and these archives I
don''t see a solution to my question.
Question:
What is the cleanest way to load a div via AJAX when the page loads - no
user action necessary. I don''t really want to hack in a hidden remote form
or link that is
2020 Sep 30
4
How to use ssh -i with a key from ssh-agent rather than from a file?
Hi,
I have a VM with a git repository whose origin is on
github. I have several keys known to github, so I needed
to set git's core.sshcommand config parameter in the
repository to something like this:
ssh -i ~/.ssh/id_ed25519_github2
But it meant that I needed to copy that key to the VM.
The same key is available via my forwarded ssh-agent
connection. Is it possible to tell ssh to use
2006 Aug 06
10
editor recommendation
Hello lsit,
I''am new to rails (about 2 hours) and after the first lines of code
I must say: Great! I love it!
Can someone recommend me a editor? I run Ubuntu Dapper.
Th?ngs
--
Jochen Kaechelin, fvgi242ss, wlanhacking.de
http://mail.wlanhacking.de/cgi-bin/mailman/listinfo
http://www.gissmoh.de - Mein sonstiges Leben!!
2006 May 02
4
ordering after a inject
Hi,
My results are getting out of order after I do the following command:
count = result.inject({}) { |hsh, row| hsh[row[''name'']] = row[''count''].to_i;
hsh }
Why?
Here are more specifics:
My complete method is this (based off of acts_as_taggable code - not'' DHHs,
but the original one):
def self.sql_to_count_plays(lookback)
sql =
2006 May 21
12
TDD for Rails book?
It seems like half the people on this list are writing a book on Ruby
or Rails. For all the hints I''ve seen strewn across the list I have
yet to see one that will focus on test-driven development for either
Ruby or for Rails.
If anyone is looking for a topic, please consider this. I''ve been
trying to wrap my brain around the TDD process, but its way of
thinking is
2006 Feb 23
11
Sessions question
Hi, I''m a little confused about sessions. I have two objects, object
"Apple" and object "Banana". These two objects have an N:M
relationship. What I am doing is listing All of the Banana objects that
are associated with a single Apple, then below that listing all of the
Banana objects not associated with that same Apple. The user is then
allowed to change the
2006 Feb 05
26
Ruby on Rails and other sites use PHP?
I can''t think of a good reason, other than it''s legacy code which hasn''t
gotten around to being changed to RoR.
http://rubyonrails.org/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://37signals.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://basecamphq.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://backpackit.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
2006 Apr 05
9
Is eval the only way?
Hi,
I''m trying to write some methods which use a parameter to represent a
Class name.
A very simplistic example:
def foo(class_name, conditions)
x = class_name.find(:all, :conditions => "#{conditions}")
end
Unfortunately, this does not work. The only way around this problem
that I can think of is to use eval:
def foo(class_name, conditions)
x = eval
2006 Jan 10
13
# of entrys in different months
right now im writing a weblog as my first project in rails. Most tings
seems to be working great :), but there is (a least) one thing left i
can''t figure out how to do.
As most weblogs i would like to have an archive, whick looks like this:
January 2006 (42)
December 2005 (60)
November 2005 (2)
October 2005 (101)
September 2005 (4)
August 2005 (2)
July 2005 (101010)
where (x) is the
2006 Mar 09
8
Problem with scaffolding and table name
Hello, i''m new in ruby rails framework. I have the following problem. I
try to create a scaffold
for a certain model of my db, but since ruby rails doesn''t assume the
table name corectly (its incidents_reported )
i get errors ....
Besides renaming the table :) is there a way to ''tell'' ruby rails the
name of the table?
I haven''t been able to find any