Displaying 20 results from an estimated 10000 matches similar to: "9cays - A Rails app for Group Email"
2006 May 21
3
Using ParseDate in for loop
Hi,
I''m trying to use ParseDate within a for loop but I get this error:
can''t dup NilClass
Any suggestions for making this work?
Thanks,
-Jason
2006 Jun 10
3
Weird Problem With Active Record
Is it me or is my model getting the created_at from the wrong model!
I have a HABTM relationship between Problems and Tags. In one of my
controller I do the following:
def view
@tag = Tag.find_by_name @params[:id]
end
In my view I do this:
<% @tag.problems.each do |problem| %>
...
<%= problem.created_at %>
...
<% end %>
Now, how come the created_at
2006 May 09
7
going crazy!!!!!! ActiveRecord::StatementInvalid in Project
any suggestions on why I am gaining this error.
ActiveRecord::StatementInvalid in ProjectsController#create
Mysql::Error: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near '' , , , , )'' at line 1: INSERT INTO projects (`name`,
`date_created`, `quote_id`, `client_id`, `description`, `user_id`)
2006 Apr 16
8
"Cannot convert String to Integer" after using association
So, I''ve written a partial that does some stuff with a given instance of
my class "entity". Entity is ActiveRecord. I''m able to retrieve all
sorts of data from an @entity, until I do something like:
<% for @attribute in @entity.attributes %>
<div id="attribute_<%= @attribute.id %>">
<%= render(:partial =>
2006 Jul 09
8
Can the has_many create() method return an ID?
Hi all,
I have a has_many relationship, Cookbook :has_many Recipes
If I want to create a new recipe in my cookbook I do:
cookbook.recipes.create(data)
It would be nice if I could then easily get the id of the new recipe,
but the create() method doesn''t seem to return anything. Any ideas how?
Thanks in advance!
Cameron
--
Posted via http://www.ruby-forum.com/.
2006 Jun 27
13
Campfire: Dissection
Campfire REALLY intrigues me... Its simple enough, yet the
possibilities are endless once they get the API in place for it.
I''m curious though, how are they handling they load with say 50 campfire
sessions going and 20+ people in each session. There are a lot of
AJAX.Requests going I''m assuming. Seems to me the server *should* be
getting bogged down on the constant
2006 May 31
3
instance variable problem
I''m having some trouble with an instance variable being read as nil in
my app. I have an image uploading, that can be added to categories.
The page loads up initially fine, and if I upload an image without
errors everything works fine. I''m working on the validation, but with
the code I have if their are validation errors it renders ''new'' again,
but reads
2006 Jun 01
3
more questions: human_name
One more question:
Is there some way to set the human_name of a column? e.g.: human_name
for column address1 shouldn''t be Address1 but "Address, line 1".
If not, should I make a hash with my custom names?
Best regards,
--
----------------------------------------------------------------------
Yannick Majoros http://www.inma.ucl.ac.be/~majoros
Informaticien UCL/INMA-MEMA
2006 Jun 11
4
remote_function posting?
Hi, I''ve noticed that my remote_function calls are resulting in POST
requests. As a result, my routes do not apply since it does not generate a
url based on the parameters, but simply posts to the raw url with post data.
I want to make a GET request instead of a POST. How can I do that? Has
anyone else run into this?
Thanks, Ryan
--
View this message in context:
2006 Apr 11
8
Does Rails provide solid support for UTF-8?
I need to use UTF-8 in my app and was wondering if Rails would support
it properly.
Some sites seem to be saying that it has weak internationalization
support. Is this true? If so, where is the problem? What should I look
out for?
Are there tweaks, plugins or gems that fix the problem?
TIA.
David
--
Posted via http://www.ruby-forum.com/.
2006 May 03
2
Perplexing nested transaction issue
I''ve been struggling with a strange nested transaction problem for a while.
I have a two objects with the following relationships:
Mail has_many :recipients
Recipients belong_to :mail
I''d like to update the status of the Mail object while sending mails for
each of it''s recipients. Following is a simplified example that I''m having
problems with:
def
2005 Nov 15
2
FormOptionsHelper select call failing
In Rails 0.14.3, I''m doing the following in a view:
<%= select ''folder'', ''format'', [''a'', ''b'', ''c''] %>
This line in is failing with:
ActionView::TemplateError (too few arguments.)
Am I calling select incorrectly? (Yes, the @folder object does exist,
and does have an attribute
2006 Jan 12
2
Engines issue: rake test_plugins failing when it shouldn''t
I create a simple engine with a simple controller:
class FredController < ApplicationController
def hello
render :text => ''Hello, world!''
end
end
and I create a simple functional test within the engine:
class FredControllerTest < Test::Unit::TestCase
...
def test_hello
get :hello
assert_response :success
end
2005 Jul 26
3
Generating unique random tokens for ActiveRecord objects
I have an ActiveRecord subclass that needs to generate a random (hard
to guess) token for each record in its corresponding table. Currently
I''m doing something like this:
def before_create
self[''token''] = random_value
while self.class.find_by_token(self[''token''])
self[''token''] = random_value
2006 Jan 31
4
Rails bug? Conditions on associations ignored by eager loading
I''m looking for someone to confirm the following as a bug in Rails
1.0 before I post it to Trac.
If I use eager loading on an association that has conditions defined,
the conditions are ignored.
The following example illustrates the problem. I have two tables:
create_table "blogs", :force => true do |t|
t.column "name", :string
end
create_table
2006 Jun 26
1
Campfire API
I''ve seen:
http://habtm.com/articles/2006/04/14/meet-marshmallow-the-campfire-bot
And it got me to wondering if anyone has heard that 37s will be
releasing an API set for Campfire? Something along the lines where I
can create my own UI, send messages to the chat, etc.
--> Steve
--
Posted via http://www.ruby-forum.com/.
2006 May 29
2
Creating a new virtual field
Hello,
I have a problem with one of my Rails-Application, I have a table and on
this there is object_name and a object_nr, so i want to create a
combination of both in the model for a collection box.
I''ve tried something like this:
def set_new_object_name
objects = find(:all).to_new_object_name
end
def self.to_new_object_name
self.new_object_name = self.object_nr + " -
2006 Feb 12
3
Error when Eager Loading "Not unique table/alias"
Hi list,
I get the error "Not unique table/alias" (myql 4.1) when trying eager
load 2 classes that use the same base class (not STI)
Example:
<code>
class Wedding < ActiveRecord::Base
belongs_to :bride, :class_name => ''Person'', :foreign_key => ''bride_id''
belongs_to :groom, :class_name => ''Person'',
2006 Apr 03
5
Heavy e-mail receive
Performance experts,
Normally to receive e-mails is to pipe their content to script/runner
individually from a mail server, sendmail or postfix. Doesn''t this
configuration run like Apache 1.3 with CGI, meaning for each e-mail a
boot of the entire Rails environment and thus low scalability?
Is there anything working like lighttpd-fcgi or going toward its
approach?
DD
--
Posted via
2006 Apr 15
8
I need to send an email when something happens in my model...
but the model isn''t the right place to send mail from. That just
seems like pretty bad coupling, generating emails from within the
model. Or is that not a problem? On top of that, these emails need
to contain links back to my site...which is a bit of a pain in
ActionMailer, but I found directions on
http://wiki.rubyonrails.com/rails/pages/HowtoUseUrlHelpersWithActionMailer
however I