Ruby on Rails Saturday, February 1, 2014

Yes, it must be in routes. I forgot. In config/routes.rb it seems to be handle with:

resources :accounts

In the documentation it seems I can specify which methods I want to allow:

resources :accounts, only: [:index, :new, :create, :edit, :update, :destroy] # no show

is this the correct/ best way to restrict access? Then I can delete my controller method ad view(?)


On Sunday, 2 February 2014 10:46:41 UTC+9, Hassan Schroeder wrote:
On Sat, Feb 1, 2014 at 5:18 PM, Bizt <marty...@gmail.com> wrote:
> I used "rails generate scaffold ..." to build my model, views and
> controllers. However for this particular MVC I don't want to have a show
> template. So, I removed the show method from the controller. But, show still
> appears. Why is this.

What does `rake routes` tell you? Compare that to config/routes.rb.

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/50c0e74d-07c0-47d3-8af2-2b6a347ce3b9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment