Displaying 20 results from an estimated 4000 matches similar to: "Advice needed on tracking down unusual error"
2006 May 02
6
Is there a link_to ''external url''?
I''ve checked the Rails documentation but find no mention of link_to
''external url'' or equivalent. Does rails have a built in method to do
this?
thanks
-Lindsay
--
Posted via http://www.ruby-forum.com/.
2006 May 08
3
Can you have multiple before filters?
Hi,
Is it possible to specify multiple before filters in a controller...
here''s the thing: only one set of filters is to use the :except option.
Something like:
before_filter :check_for_session_cookie
before_filter :validate_user :except =>[''login'']
which I use to a) check if the user has returned to the site and has a
saved cookie holding login details b) check
2006 May 02
5
does not equal conditional
I am trying to figure out how to write a conditional statement that will
execute only if a specified variable is not empty.
Right now my view looks like this:
<dt>Building Regulations</dt>
<% for link in @cat1 %>
<dd><a href="<%= link.url %>"><%= link.title %></a></dd>
<% end %>
Action:
@cat1 = Link.find(:all, :conditions
2006 Apr 29
5
HABTM - how to insert join row when associated rows exist
I have successfully used HABTM to create a many-to-one-to-many set of
rows in one step. Now, if two objects I want to associate already exist,
how do I create the join row? The Agile book mentions the
''push_with_attributes'' method. The text says this method is useful for
adding additional attributes to the join row (in the example a ''read_at''
timestamp). I
2006 Apr 20
2
Is there a problem with Agile code in Web 2.0 chapter?
Hi, I''m running the code example for ''Dynamically Updating a List'' in
Agile pages 404-406:
When I enter a new to-do, and click ''New Item'', a new page is rendered
only displaying the new to-do just entered. This isn''t what''s expected.
The to-do list with id="items" should be updated so the to-do list
dynamically grows.
2006 Feb 20
4
SHow do you suppress ERB newlines globally
Is there a config flag to suppress the newline at the end of every ERB
''%>'' tag, so it would not be necessary to type ''-%> each time?
--
Posted via http://www.ruby-forum.com/.
2006 Feb 25
2
How to access param entered through text_field
I''m rendering partial a form comprising several text_field helpers to
maintain my User model. For example, the email field is:
<p><label for="user_email">Email</label><br/>
<%= text_field ''user'', ''email'', :size => ''40'', :maxsize => ''256''
%></p>
In my controller,
2006 May 11
3
Textile/RedCloth and h() incompatible?
If a user enters the Textile-based code for an image, say:
!>graphic.png!
the textile() method will successfully render a right-float image. Now,
if I want to escape the user''s text using h(), the ''>'' is turned into an
&. Obviously, the image then fails to render in a browser. Is there
a work around for this?
I guess what I''m really asking
2006 Feb 22
3
Unit test failure - nil object?
I''m following instructions in the Agile book, page 146 for testing an
object update to the database. Here''s my code:
def test_update
assert_equal "jack@smiths.com", @user.email
@user.email = "jack@smiths.org"
assert @user.save, @user.errors.full_messages.join("; ")
@user.reload
assert_equal @user.email,
2006 Apr 06
8
Fastest learning path to RoR
hi!
with a 4GL background, wanting to learn RoR, what is the fastest
learning path i should take? should i go grab a RoR tutorial, and learn
Ruby along the way, or start with plain Ruby first?
thanks for any inputs!
2006 Mar 21
4
Can RoR''s AJAX helpers do this?
Hi,
I want to type text into an input field then on enter, use AJAX to
update the value of an input field elsewhere on the screen.
''observe_field'' allows me to watch a form field and dynamically update a
DIV. Is there a variation or other method to allow me to update a field
instead?
--
Posted via http://www.ruby-forum.com/.
2006 Jun 21
3
Is this a weird bug with auto_complete?
I think I may have found a bug with the auto_complete feature in rails:
My controller has a before_filter with an except clause preventing the
filter from running on a specific action. The action renders a view with
a text_field_with_auto_complete field. Much to my suprise, the filter
appears to run when I type data into this field! The filter is part of
my security regime, so I end up with a
2006 Mar 25
3
validates_presence_of validation order?
I have a form with 3 fields: user_id, email and password.
All 3 fields are required, so I have a "validates_presence_of :user_id,
:email, :password" in my model.
Works, but the validation errors show up in a different order than I
specificed in the validates_presence_of statement.
Is there a way to specify the order in which the validations (and
corresponding error messages) should
2007 Feb 06
3
Form won't accept ampersand
Hi guys,
My start_form_tag generated form will not accept a text field containing
an ampersand.
For example, the text ''A & B'' is trunacted to ''A'' in the param hash.
I know ampersands have to be encoded in URLs, but I''m surprised my form
has a problem with this. I''ve tested this in Safari and Firefox.
thanks
Lindsay
--
Posted via
2006 Jan 07
10
RMagick bus error on OS X in console mode
This is a strange bug that I''ve never seen before. It only shows up
when I run the app through the console (the app is Family Connection,
and it works fine when run as a web app):
22$ ruby script/console
Loading development environment.
>> User
/opt/local/lib/ruby/vendor_ruby/1.8/powerpc-darwin8.3.0/
RMagick.bundle: [BUG] Bus Error
ruby 1.8.2 (2004-12-25)
2006 Mar 03
2
Accessing cookie and session objects
Is it possible to directly access session and cookie objects from within
a Model? When I try to read the session object in my User Model I get
the following error:
NameError (undefined local variable or method `session'' for User:Class):
I could pass attributes taken from the session into my method in the
User Model, but this seems to go against DRY.
-Lindsay
--
Posted via
2006 Apr 13
8
DevTower Beta3 Release!
DevTower Beta3! (0.3)
I''m proud to announce some major changes and improvements to DevTower in
this beta release! First and foremost, DevTower is now a full plugin. Also,
DevTower works (only) with Rails 1.1.
==== ABOUT =====
DevTower used to synchronize the development of Ruby On
Rails applications with developers working simultaniously
on multiple systems with Subversion. DevTower
2006 Feb 15
2
First unit test fails
I''ve just started working through ''Agile'' chapter 12
''Testing''. I''ve followed the steps carefully, setting up a fixture and
unit test to check the creation of an order. When I run the test I get
the following:
Loaded suite test/unit/order_test
Started
F
Finished in 0.108008 seconds.
1) Failure:
test_create(OrderTest)
2006 Aug 18
5
potential enterprise rails project
Hello Rubyists,
I''m in the position of being given the job to design and build a
mission-critical web facing application for a small but growing
enterprise. It is to be used by customers as needed, numbering in
the tens up to the hundreds. It will collect operational data,
particularly in a table around 50 columns wide, and potentially
millions of rows deep, most fields being numerical.
2006 May 04
1
How do I identify the initiating View from within a Helper?
I would like to call a helper method from my View to construct a sidebar
menu. The menu is contextual, so ideally I would like to do something
like this:
View
----
<%= sidebar_menu %>
Helper
------
def sidebar_menu
case _calling_view_
when ''_view_identifier_''
... build menu...
end
end
where ''_calling_view_'' is the key that points to the