Displaying 20 results from an estimated 4000 matches similar to: "Validation and Single-Table Inheritance"
2006 Jan 12
4
Typecasting and boolean attributes
I have 2 radio buttons like this:
<%= radio_button ''group'', ''public'', true %>
<%= radio_button ''group'', ''public'', false %>
They hold the correct values when viewing the @group object. However,
when updating, it does not appear that the params[:group][:public]
value is being typecast correctly.
As
2006 Jan 13
1
Rendering an RJS template within another RJS template
Is there a way to render an RJS template within another?
I''ve put my simplified code below. No errors are generated, but the
partial isn''t rendered. I also tried using render :action =>
''update_actions''
destroy.rjs---
page.visual_effect :fade, comment_container(@object.id.to_s)
# update the number of comments(below is another rjs template)
render :partial
2005 Sep 12
1
Edit In Place: text with line breaks
All,
I need to apply EditInPlace to a block of text that has line breaks.
I''d like to have the editable text load instantly by grabbing the text
from the page instead of using the "loadTextURL" option. However, this
will pull in the html formatting ( <br> and <p>).
Wanted to see what ideas the list had as far as making this possible -
the best idea I''ve
2005 Sep 07
3
Autocomplete Error w/Version 1.5_pre4
I recently updated to version 1.5_pre4 to use the excellent in-place
editor, however, I''m now seeing a bug with AutoCompletion.
When text is entered in the text field for auto completion, the
auto_complete div is not updated (but the server does receive the
request and return a response). Upon removing focus from the text
field, 2 instances of the following error can be seen in both
2006 Apr 20
1
Setting :status for inline RJS?
Is there a way to set the :status when using inline RJS rendering in
controllers?
Something like:
render :status => 500, :update do |page|
page.insert_html ....
end
--
Derek Haynes
HighGroove Studios - http://www.highgroove.com
Atlanta, GA | San Mateo, CA
Keeping it Simple.
404.751.1762
2005 Dec 31
9
RJS Templates not conducting callbacks
I''ve run across a weird problem with RJS that I''m trying to figure out:
I have an application that was running 0.13.1 that I recently upgraded
to Rails 1.0. I wanted to use RJS templates, so I installed the plugin
and updated my prototype javascript file via ''rake update_prototype.''
I attempted to test the templates out via the following code, but the
AJAX
2005 Oct 20
5
Unit Test Error: `load_specification': undefined method `parse' for Time:Class
All,
I''ve come across a confusing problem when attempting to run unit tests
for an application on OSX (works on Windows).
I''m receiving the following error:
`load_specification'': undefined method `parse'' for Time:Class (NoMethodError)
This is also confusing because I can''t figure out how the error
appeared. When I revert back to previous revisions,
2007 May 29
0
index#term_docs returns no docs / term_docs_for does
I''m building my first Filter and I''m running into an issue with
Ferret::Index::IndexReader#term_docs.
As I understand it, index_reader.term_docs should return a
term-document enumerator for the entire index:
index_reader.term_docs => empty set
However, I''m getting an empty set. Interestingly enough, the following:
index_reader.term_docs_for(:name,
2006 Jun 16
5
BackgrounDRb / Testing Error: uninitialized constant BackgrounDRb
I''m digging into BackgrounDRb and having some problems testing a worker class.
The following line in my test (created from script/generate worker
Test) throws an error:
worker = TestWorker.new(:test_string => "testing...")
Error:
/activesupport/lib/active_support/dependencies.rb:123:in
`const_missing'': uninitialized constant BackgrounDRb (NameError)
from
2006 Nov 04
0
#expire_fragment in models...any clean solutions?
I''ve seen a couple of workarounds on the mailing list related to
expiring cached fragments inside of models, but nothing too clean.
Anybody have any suggestions for handling this at the model-level? I
have an application is updated outside of the Rails controllers, so I
can''t use a Sweeper.
The 2 methods I''ve seen:
a. Use a callback to generate an HTTP post on a
2005 May 31
2
Form Dates and MultiparameterAssignmentErrors
I''m using the date_select form helper for a date_of_birth field on an
ActiveRecord object. When I try to save a date earlier than 1 Jan 1970,
ActionController punts with
ActiveRecord::MultiparameterAssignmentErrors. The message it gives is
"1 error(s) on assignment of multiparameter attributes". I was able to
catch the exception and look at it, and it is certainly complaining
2005 Apr 20
5
ActionMailer: Net::SMTPSyntaxError (502 unimplemented (#5.5.1) error
Quick ActionMailer Question:
I''m trying to send a test email message using ActionMailer and I get a
Net::SMTPSyntaxError (502 unimplemented (#5.5.1) error.
I''m attempting to access a remote smtp server and have setup my
settings in the environment.rb file according to the "how to" article.
My test controller:
class MailTestController < ApplicationController
2006 Aug 18
3
New automated Capistrano setup for Apache2.1+ and mongrel_cluster
Hi mongrel users!
I just posted a bad-ass capistrano file that automates *everything*
for setting up an apache2+mod_proxy_balancer and
mongrel+mongrel_cluster -- including apache2 setups. It''s based off
Coda Hale''s guide and all Bradley''s work at fluxura and RailsMachine
(thanks Coda and Bradley!).
It''s, well, bad-ass, if I must say so myself. My favorite
2006 Jan 02
3
Selecting conditionally from HABTM
Hello,
I was wondering whether there is a nice Rubyesque way of selecting
from a pair of HABTM models where one of them is inherited from
another object.
Here is the situation:
I have a ''posts'' table from which ''replies'' and ''articles'' are
inherited. Articles have_and_belong_to_many categories, but neither
posts nor replies do (it just does
2005 Dec 31
3
[Model] [Noob] Table Naming w/ underscores
Greetings:
I am writing a basic accounting module for an app. Rather unfortunately the
name "transactions" is a reserved term in Rails (being the only accounting
term trully representational of a financial transaction). I am left to come
up with other names. One such name was f_transaction.
This worked on the DB level, but I noticed that the Model name dropped the
underscore, thus
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout
test_controller
def list
layout "stdlayout"
end
in the views/test/layouts stdlayout.rhtml
<html>
<head><title>test</title></head>
</body>
<h1>Test</h1>
<%= content_for_layout %>
</body>
</html>
2) I get Rails Application Error when trying to use a separate
2007 Sep 18
1
Mongrel Upload Progress progress method returns Content-Length: 0
Running into a strange bug using the mongrel upload progress plugin
handler, sitting in front of a simple mongrel.
The bug appears on an old Xserve (mac OS X 10.3.9 powerpc), but not on
my macbook pro, or even a generic 686 linux box.
http://pastie.textmate.org/98341
The gist of the pastie above shows that attempts through the browser
and curl are actually hitting the filesController, as
2007 Jun 16
2
1st DOVECOT installation automatically quitting on login
Hi there.
I have just installed DOVECOT 1.0.1 for the first time.
After launching it, I can verify that
ps -ax | grep -i dovecot
1052 ?? Ss 0:00.03 /usr/local/dovecot/sbin/dovecot -c
/etc/dovecot/dovecot.conf
1053 ?? S 0:00.06 dovecot-auth
1058 p2 R+ 0:00.01 grep -i dovecot
ps -ax | grep -i imap
1054 ?? S 0:00.08 imap-login
1055 ?? S 0:00.08 imap-login
2006 Nov 04
0
Functional test issue for testing newbie
Hi there
I''m having difficulty succesfully updating attributes via a post
request in a functional test.
Here''s some pastes:
######################################
# account_controller.rb
def edit_details
@user = User.find(self.current_user.id)
return unless request.post?
if @user.update_attributes(params[:user])
flash[:notice_good] = ''Your account details
2006 Oct 23
1
Updated Apache Best Practices Doc fixes
Hi guys,
Thanks to several members I''ve updated the apache best practices docs
to include several fixes including the bug reported (by Zed and
someone else I believe, sorry for the non-attribution) with IE''s \b
instead of b rule for deflate.
I also added some success stories from Martins, Phillip Hallstrom, and
Jens Kraemer -- and the REMOTE_USER pass instructions from Jon