# ActiveRecord

**URL:** <https://www.ruby-forum.com/t/activerecord/102496>\
**Category:** Rails\
**Created:** [November 24, 2005, 8:54pm UTC](https://www.ruby-forum.com/t/activerecord/102496 "2005-11-24T20:54:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![christiang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@christiang](https://www.ruby-forum.com/u/christiang)\
**Post date:** [November 24, 2005, 8:54pm UTC](https://www.ruby-forum.com/t/activerecord/102496/1 "2005-11-24T20:54:46Z")

</div>

OlÃ¡. Estou com problemas para tratar exceÃ§Ãµes em ruby.  
Tenho duas validaÃ§Ãµes no mesmo mÃ©todo, update. ValidaÃ§Ã£o de data e  
validaÃ§Ã£o de campo numÃ©rico. PorÃ©m somente a validaÃ§Ã£o de data estÃ¡  
sendo efetivamente realizada.  
Segue o cÃ³digo:  
def update  
begin  
@guiaencamhospital = Guiaencamhospital.find(params[:id])

```
 @guiaencam = @guiaencamhospital.guiaencam
 @crianca = Crianca.find(@guiaencam.crianca_id)

 if 

```

@guiaencamhospital.guiaencam.update\_attributes(params[:guiaencam]) and  
@guiaencamhospital.update\_attributes(params[:guiaencamhospital])  
flash[:notice] = ‘Guia foi atualizado com sucesso.’  
redirect\_to :action =\> ‘show’, :id =\> @guiaencamhospital  
else  
@guiaencamhospital = Guiaencamhospital.find(params[:id])  
@guiaencam = @guiaencamhospital.guiaencam  
@crianca = Crianca.find(@guiaencam.crianca\_id)  
@medicos = Medico.find\_all  
render :action =\> ‘edit’  
end

```
 @erro = error_message_on(@guiaencamhospital, update, prepend_text = 

```

“teste1”, append\_text = “teste2”)

```
 rescue ActiveRecord::MultiparameterAssignmentErrors
     @guiaencamhospital = Guiaencamhospital.find(params[:id])
     @guiaencam = @guiaencamhospital.guiaencam
     @crianca = Crianca.find(@guiaencam.crianca_id)
     @medicos = Medico.find_all
     render :action => 'edit'
     flash[:notice] = 'Erro: ' + @erro

end

```

end

AlguÃ©m sabe como eu posso fazer as duas validaÃ§Ãµes de maneira separada,  
tal que ambas possam ocorrer?

Obrigada

---

<div class="post-metadata">

**Author:** ![christiang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@christiang](https://www.ruby-forum.com/u/christiang)\
**Post date:** [December 12, 2005, 11:26pm UTC](https://www.ruby-forum.com/t/activerecord/102496/2 "2005-12-12T23:26:00Z")

</div>

I need a couple of hosting recommendations from you folks:

1. A really cheap and reliable RoR site for very-low volume  
demonstrations and such.  
Something under $10 per month with maybe a few users a day. I can put  
stuff there and use  
it to demonstrate web designs.

2. A utilitarian RoR hosting/colo vendor for small online stores. Think  
“A 2-store chain”  
putting up it’s first online store. Small operations.

Warren S.

---

<div class="post-metadata">

**Author:** ![christiang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@christiang](https://www.ruby-forum.com/u/christiang)\
**Post date:** [December 12, 2005, 11:38pm UTC](https://www.ruby-forum.com/t/activerecord/102496/3 "2005-12-12T23:38:03Z")

</div>

TextDrive ([http://www.textdrive.com](http://www.textdrive.com)) is the “official” Ruby on Rails  
host. I’ve had great experiences with them

–  
[http://scotchandpolitics.com](http://scotchandpolitics.com)

---

<div class="post-metadata">

**Author:** ![christiang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@christiang](https://www.ruby-forum.com/u/christiang)\
**Post date:** [December 13, 2005, 12:29am UTC](https://www.ruby-forum.com/t/activerecord/102496/4 "2005-12-13T00:29:21Z")

</div>

On Dec 12, 2005, at 2:24 PM, Warren S. wrote:

> I need a couple of hosting recommendations from you folks:
> 
> 1. A really cheap and reliable RoR site for very-low volume  
> demonstrations and such.  
> Something under $10 per month with maybe a few users a day. I can  
> put stuff there and use  
> it to demonstrate web designs.

[Textdrive.com](http://Textdrive.com), [planetargon.com](http://planetargon.com), [dreamhost.com](http://dreamhost.com)(cheaper but less quality)

> 1. A utilitarian RoR hosting/colo vendor for small online stores.  
> Think “A 2-store chain”  
> putting up it’s first online store. Small operations.

[rimuhosting.com](http://rimuhosting.com) has great VPS servers that run on the Xen platform. I  
have written about them here:  
[http://brainspl.at/articles/2005/11/11/rails-vps-servers-at-](http://brainspl.at/articles/2005/11/11/rails-vps-servers-at-)  
rimuhosting-com  
[http://brainspl.at/articles/2005/11/13/the-perfect-lightweight-rails-](http://brainspl.at/articles/2005/11/13/the-perfect-lightweight-rails-)  
lighttpd-debian-install

And [rackforce.com](http://rackforce.com) has good deals on dedicated servers. Around $100  
for your own dedicated server with root access and unlimited monthly  
bandwidth on a fat 100mbit pipe.

> Warren S.

Hope that helps you some. I host all of my rails sites on rimu or  
rackforce these days.

Cheers-  
-Ezra Z.  
Yakima Herald-Republic  
WebMaster  
[http://yakimaherald.com](http://yakimaherald.com)  
509-577-7732  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![christiang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@christiang](https://www.ruby-forum.com/u/christiang)\
**Post date:** [December 13, 2005, 12:29am UTC](https://www.ruby-forum.com/t/activerecord/102496/5 "2005-12-13T00:29:21Z")

</div>

On 12 Dec 2005, at 22:24, Warren S. wrote:

> 1. A utilitarian RoR hosting/colo vendor for small online stores.  
> Think “A 2-store chain”  
> putting up it’s first online store. Small operations.

Which country are they operating in?

## Yours, Craig

Craig W. | t: +44 (0)131 516 8595 | e: removed\_email\_address@domain.invalid  
[Xeriom.NET](http://Xeriom.NET) | f: +44 (0)709 287 1902 | w: [http://xeriom.net](http://xeriom.net)

---

<div class="post-metadata">

**Author:** ![christiang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@christiang](https://www.ruby-forum.com/u/christiang)\
**Post date:** [December 13, 2005, 12:35am UTC](https://www.ruby-forum.com/t/activerecord/102496/6 "2005-12-13T00:35:22Z")

</div>

On 12/12/05, Warren S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. A really cheap and reliable RoR site for very-low volume demonstrations and such.  
> Something under $10 per month with maybe a few users a day. I can put stuff there and use  
> it to demonstrate web designs.

A Small Orange:

[http://asmallorange.com/services/hosting/](http://asmallorange.com/services/hosting/)

Highly recommended.

–  
Chris B.

[http://hypsometry.com/](http://hypsometry.com/) : website edification  
[http://uvlist.org/](http://uvlist.org/) : free classifieds for the Upper Valley

---

<div class="post-metadata">

**Author:** ![christiang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@christiang](https://www.ruby-forum.com/u/christiang)\
**Post date:** [December 13, 2005, 12:40pm UTC](https://www.ruby-forum.com/t/activerecord/102496/7 "2005-12-13T12:40:12Z")

</div>

Warren

```
> 1) A really cheap and reliable RoR site for very-low volume

```

demonstrations and such.  
\> Something under $10 per month with maybe a few users a day. I  
can put stuff there and use  
\> it to demonstrate web designs.

69$ @ [http://www.dreamhost.com/](http://www.dreamhost.com/)  
You won’t find cheaper than dreamhost, and many users on this list say  
that it rocks for them:  
Enter the promocode  
goodgood69  
, and you’ll get a 50$ reduction on the yearly fee (119$ → 69$)

They have a wiki loaded with Rails info:  
[http://wiki.dreamhost.com/index.php/Ruby\_on\_Rails](http://wiki.dreamhost.com/index.php/Ruby_on_Rails)

bonuses:

- You get a free domain - .com, .net, .org - registration, and there are  
no yearly fee, as long as you keep your account at dreamhost
- You’ll get huge amount of disk space and bandwidth, and they’ll  
increase it every week.
- They pledged in 1998 to never rise the fee.

note:  
For optimal performance, read and apply the recipes found in :

[http://weblog.textdrive.com/article/175/rails-optimizing-resource-usage](http://weblog.textdrive.com/article/175/rails-optimizing-resource-usage)

Alain
