On Jun 13, 11:05 pm, "Älphä Blüë" <[email protected]>
wrote:
> Maurício Linhares wrote:
> > Yes, this is very bad, if there's no "edit", "update" or "destroy" in
> > your controller Rails will just send a 404 back to the browser, it
> > won't do anything like letting your user do something you haven't
> > programmed yourself.
>
> So, how do you block these specific actions?
>

map.resources takes :only/:except options if you don't want certain
things to be routed. You also delete the new template and action.
> Also, if a user clicks on a link beyond the controller parameter:
>
> http://mydomain.com/rushing_offenses/goo(for instance) the following
> error is returned on my screen:
>
> ActiveRecord::RecordNotFound in Rushing offensesController#show
>
> I don't want errors like this to show for anyone.  Is this just a
> development error response and not one that shows up in production?

in production typically users just see a generic 'something went
wrong' page. if you want something different you can rescue the
exception and show something appropriate.

Fred
>
> Thanks again.
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to