Displaying 13 results from an estimated 13 matches for "robmnl".
Did you mean:
robin
2006 Mar 16
4
Handling/Catching Exceptions
Hello!
I was wondering, sometimes I raise an exception in my Rails apps, e.g.:
raise SecurityError unless @post.user == logged_in_user
Now: is there any way to catch that SecurityError exception somewhere
and render a custom template? E.g., I want to render
''app/views/content/security_error.rhtml''
Does anyone know how to do this?
Thanks a bunch,
Rob
2006 Apr 01
4
Custom Validations
Does anyone how to create a validation that:
validates_presence_of :a OR :b
I.e. :a OR :b must be present.
I thought this would probably be possible with some kind of validation
callback, e.g.:
def check_a_or_b_is_set
return (a or b)
end
Any ideas?
Thanks,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Apr 01
2
Textile headaches
I have the newest version of RedCloth installed (3.0.4). I want the
following output:
<h1>Header</h1>
<p>Some text</p>
This is what I tried but no luck:
irb(main):002:0> require ''rubygems''
=> true
irb(main):004:0> require_gem ''RedCloth''
=> true
irb(main):006:0> RedCloth.new("h1. Header\r\nSome Text").to_html
2006 May 21
3
Sending mail times out (ActionMailer)
Hi!
I''m on debian. Sending a mail from Rails times out:
Timeout::Error (execution expired):
/usr/local/lib/ruby/1.8/timeout.rb:54:in `new''
/usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open''
/usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout''
/usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout''
2006 Apr 14
2
Markaby trunk broken?
Hello!
Does anyone know how I can check out the Markaby trunk? I''m getting this
error:
<code>
ruby script/plugin install
http://code.whytheluckystiff.net/svn/markaby/trunk
+ ./trunk/svnindex.xsl
/usr/local/lib/ruby/1.8/open-uri.rb:290:in `open_http'': 404 Not Found
(OpenURI::HTTPError)
from /usr/local/lib/ruby/1.8/open-uri.rb:629:in `buffer_open''
2006 Jul 16
1
Don''t log params
Hello!
I need to supress the logging of params for certain actions, i.e. I don''t
want the params hash to show up in one of my actions.
Does anyone know how to do that?
Thanks,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060716/62b2e2d5/attachment.html
2006 Mar 13
6
JobsOnRails
Announcing... JobsOnRails!
I''m creating on a Ruby on Rails oriented job site and will be launching
in the next few weeks. It''s a Rails-centric place for developers and
employers to get in touch with a minimum of hassle.
For now, I have a short outline of my ideas and an email signup form on
the live site at http://www.jobsonrails.com.
The site is coming along nicely and
2006 Jun 06
14
How can I set the session in a functional test?
Hey :)
I need to simulate a login in my functional test, otherwise I can''t GET nor
POST to the action.
I need to set the session key "logged_in_user_id".
I tried this inside the setup() method:
session[''logged_in_user_id''] = 1
But that throws: TypeError: can''t convert String into Integer
Any ideas?
Thanks,
Rob
-------------- next part
2006 Mar 25
67
Your Ruby IDE
Just a poll here i am looking for a good IDE for rails and wondering
what you guys use?
features i like in an ide
code highlites
auto code complete
file browser
Currently i am using dreamwever but the code highliting is really bad
its also a pain to set up other doucment types such as .yml data config.
--
Posted via http://www.ruby-forum.com/.
2006 Mar 21
0
Drag and Drop. Can an element be both?
Hi! Does anyone by any chance know if an element can be both draggable
and a receiving element?
Thanks,
Rob
2006 Feb 16
2
Making the browser cache an action
Hi!
What HTTP headers do I have to sent to make the browser cache the
output of an action?
I tried:
request.delete(''Cache-control'') but no luck.
It''s an action that sends an image to the browser, hence I need that.
Thanks,
Rob
2006 Nov 04
0
write_attribute trouble
Can anyone clarify something for me? I''ve been having a hard time with
write_attribute.
If I do (for instance in a callback):
write_attribute(:user, user)
Is obj.user_id set automatically too? And viceversa, if I do:
write_attribute(:user_id, user.id)
Does that set obj.user for me?
Doesn''t seem like it''s doing that for me.
Anyone understands exactly what
2006 Jun 06
5
Functional tests and protected actions
Hello!
I have certain methods in my Application Controller, that I need to access.
Namely ApplicationController#logged_in_user
The problem is, that when I try to access it, I get:
NoMethodError: protected method `logged_in_user'' called for
#<AdminController>
Any ideas how I can circumvent that?
Or are functional tests really not suited for any kind of logins and session
work?