problems in routing in rails 4 app - ruby-on-rails

I have added the omniauth and devise gems and was adding facebook login support. This is my routes.rb file:
resources :authentications do
match 'auth/:provider/callback' => 'authentications/#create', :via => :post
end
I tried post as well as get in the via part.
Here is the controller for authentications controller.
def create
auth = request.env["rack.auth"]
current_user.authentications.find_or_create_by_provider_and_uid(auth['provider'], auth['uid'])
flash[:notice] = "Authentication successful."
redirect_to authentications_url
end
Here is the rake routes output
rake routes
authentications GET /authentications(.:format) authentications#index
POST /authentications(.:format) authentications#create
new_authentication GET /authentications/new(.:format) authentications#new
edit_authentication GET /authentications/:id/edit(.:format) authentications#edit
authentication GET /authentications/:id(.:format) authentications#show
PUT /authentications/:id(.:format) authentications#update
DELETE /authentications/:id(.:format) authentications#destroy
conferences GET /conferences(.:format) conferences#index
POST /conferences(.:format) conferences#create
new_conference GET /conferences/new(.:format) conferences#new
edit_conference GET /conferences/:id/edit(.:format) conferences#edit
conference GET /conferences/:id(.:format) conferences#show
PUT /conferences/:id(.:format) conferences#update
DELETE /conferences/:id(.:format) conferences#destroy
profiles GET /profiles(.:format) profiles#index
POST /profiles(.:format) profiles#create
new_profile GET /profiles/new(.:format) profiles#new
edit_profile GET /profiles/:id/edit(.:format) profiles#edit
profile GET /profiles/:id(.:format) profiles#show
PUT /profiles/:id(.:format) profiles#update
DELETE /profiles/:id(.:format) profiles#destroy
GET /conferences(.:format) conferences#index
POST /conferences(.:format) conferences#create
GET /conferences/new(.:format) conferences#new
GET /conferences/:id/edit(.:format) conferences#edit
GET /conferences/:id(.:format) conferences#show
PUT /conferences/:id(.:format) conferences#update
DELETE /conferences/:id(.:format) conferences#destroy
activity_bigbluebutton_server GET /bigbluebutton/servers/:id/activity(.:format) bigbluebutton/servers#activity
rooms_bigbluebutton_server GET /bigbluebutton/servers/:id/rooms(.:format) bigbluebutton/servers#rooms
bigbluebutton_servers GET /bigbluebutton/servers(.:format) bigbluebutton/servers#index
POST /bigbluebutton/servers(.:format) bigbluebutton/servers#create
new_bigbluebutton_server GET /bigbluebutton/servers/new(.:format) bigbluebutton/servers#new
edit_bigbluebutton_server GET /bigbluebutton/servers/:id/edit(.:format) bigbluebutton/servers#edit
bigbluebutton_server GET /bigbluebutton/servers/:id(.:format) bigbluebutton/servers#show
PUT /bigbluebutton/servers/:id(.:format) bigbluebutton/servers#update
DELETE /bigbluebutton/servers/:id(.:format) bigbluebutton/servers#destroy
external_bigbluebutton_rooms GET /bigbluebutton/rooms/external(.:format) bigbluebutton/rooms#external
POST /bigbluebutton/rooms/external(.:format) bigbluebutton/rooms#external_auth
join_bigbluebutton_room GET /bigbluebutton/rooms/:id/join(.:format) bigbluebutton/rooms#join
running_bigbluebutton_room GET /bigbluebutton/rooms/:id/running(.:format) bigbluebutton/rooms#running
end_bigbluebutton_room GET /bigbluebutton/rooms/:id/end(.:format) bigbluebutton/rooms#end
invite_bigbluebutton_room GET /bigbluebutton/rooms/:id/invite(.:format) bigbluebutton/rooms#invite
join_mobile_bigbluebutton_room GET /bigbluebutton/rooms/:id/join_mobile(.:format) bigbluebutton/rooms#join_mobile
POST /bigbluebutton/rooms/:id/join(.:format) bigbluebutton/rooms#auth
bigbluebutton_rooms GET /bigbluebutton/rooms(.:format) bigbluebutton/rooms#index
POST /bigbluebutton/rooms(.:format) bigbluebutton/rooms#create
new_bigbluebutton_room GET /bigbluebutton/rooms/new(.:format) bigbluebutton/rooms#new
edit_bigbluebutton_room GET /bigbluebutton/rooms/:id/edit(.:format) bigbluebutton/rooms#edit
bigbluebutton_room GET /bigbluebutton/rooms/:id(.:format) bigbluebutton/rooms#show
PUT /bigbluebutton/rooms/:id(.:format) bigbluebutton/rooms#update
DELETE /bigbluebutton/rooms/:id(.:format) bigbluebutton/rooms#destroy
/auth/:provider/callback(.:format) authentications/#create
root / profiles#new
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy

This
match 'auth/:provider/callback' => 'authentications/#create', :via => :post
Should be
match 'auth/:provider/callback' => 'authentications#create', :via => :post
Where authentications is controller & create is method

Related

How to pass control from one controller to other in Rails?

I have one controller called Page_controller and another one called Categories_controller. Now whenever the home method in the Page_controller is called I wanna be redirected to the a´categories controller, as I wanna control the Category view from that moment on. This is what I have written:
class PagesController < ApplicationController
def home
#categories = Category.all
redirect_to category_url(#category)
end
end
but I get an error when I open the server saying:
undefined method `category_url' for #<PagesController:0x000000000b24ce20>
for the line:
redirect_to category_url(#category)
Does anyone know how I could pass control from one controller to the other? I am really desperate so apreciate any help you can provide
EDIT: this is my routes.rb file:
Rails.application.routes.draw do
resources :comments
#resources :categories
root to: 'pages#home'
get 'index', to: 'controller_category#index'
devise_for :users
end
And the routes printed out from the console:
C:\Users\andri\Desktop\proj>bundle exec rake routes
Prefix Verb URI Pattern Controller#Action
comments GET /comments(.:format) comments#index
POST /comments(.:format) comments#create
new_comment GET /comments/new(.:format) comments#new
edit_comment GET /comments/:id/edit(.:format) comments#edit
comment GET /comments/:id(.:format) comments#show
PATCH /comments/:id(.:format) comments#update
PUT /comments/:id(.:format) comments#update
DELETE /comments/:id(.:format) comments#destroy
root GET / pages#home
index GET /index(.:format) controller_category#index
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
user_password PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
POST /users/password(.:format) devise/passwords#create
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
user_registration PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
POST /users(.:format) devise/registrations#create
rails_service_blob GET /rails/active_storage/blobs/:signed_id/*filename(.:format) active_storage/blobs#show
rails_blob_representation GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show
rails_disk_service GET /rails/active_storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show
update_rails_disk_service PUT /rails/active_storage/disk/:encoded_token(.:format) active_storage/disk#update
rails_direct_uploads POST /rails/active_storage/direct_uploads(.:format) active_storage/direct_uploads#create
Uncomment this line in your routes.rb file:
#resources :categories
That will define a set of routes for categories, which will provide you with methods such as category_url(category).
You'll also need a CategoriesController, otherwise your next problem will be that the redirect produces an error (no such controller). And you'll need to implement CategoriesController#show.
See https://guides.rubyonrails.org/getting_started.html
and https://guides.rubyonrails.org/routing.html

Rails Redirect to an Anchor Tag from the Controller

I am using Comments table as polymorphic associations. When i save the comment and it redirects to the respective associated model. I want it to pass an anchor tag to auto scroll down to display the comments. Am trying the following but the anchor tag is not passing to the url
#comment = #commentable.comments.new comment_params
#comment.user = current_user
#comment.save
redirect_to #commentable, :anchor => '#comments'
Rake Routes
Prefix Verb URI Pattern Controller#Action
rate POST /rate(.:format) rater#create
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
root GET / welcome#index
artists GET /artists(.:format) artists#index
POST /artists(.:format) artists#create
new_artist GET /artists/new(.:format) artists#new
edit_artist GET /artists/:id/edit(.:format) artists#edit
artist GET /artists/:id(.:format) artists#show
PATCH /artists/:id(.:format) artists#update
PUT /artists/:id(.:format) artists#update
DELETE /artists/:id(.:format) artists#destroy
album_comments GET /albums/:album_id/comments(.:format) albums/comments#index
POST /albums/:album_id/comments(.:format) albums/comments#create
new_album_comment GET /albums/:album_id/comments/new(.:format) albums/comments#new
edit_album_comment GET /albums/:album_id/comments/:id/edit(.:format) albums/comments#edit
album_comment GET /albums/:album_id/comments/:id(.:format) albums/comments#show
PATCH /albums/:album_id/comments/:id(.:format) albums/comments#update
PUT /albums/:album_id/comments/:id(.:format) albums/comments#update
DELETE /albums/:album_id/comments/:id(.:format) albums/comments#destroy
albums GET /albums(.:format) albums#index
POST /albums(.:format) albums#create
new_album GET /albums/new(.:format) albums#new
edit_album GET /albums/:id/edit(.:format) albums#edit
album GET /albums/:id(.:format) albums#show
PATCH /albums/:id(.:format) albums#update
PUT /albums/:id(.:format) albums#update
DELETE /albums/:id(.:format) albums#destroy
song_comments GET /songs/:song_id/comments(.:format) songs/comments#index
POST /songs/:song_id/comments(.:format) songs/comments#create
new_song_comment GET /songs/:song_id/comments/new(.:format) songs/comments#new
edit_song_comment GET /songs/:song_id/comments/:id/edit(.:format) songs/comments#edit
song_comment GET /songs/:song_id/comments/:id(.:format) songs/comments#show
PATCH /songs/:song_id/comments/:id(.:format) songs/comments#update
PUT /songs/:song_id/comments/:id(.:format) songs/comments#update
DELETE /songs/:song_id/comments/:id(.:format) songs/comments#destroy
songs GET /songs(.:format) songs#index
POST /songs(.:format) songs#create
new_song GET /songs/new(.:format) songs#new
edit_song GET /songs/:id/edit(.:format) songs#edit
song GET /songs/:id(.:format) songs#show
PATCH /songs/:id(.:format) songs#update
PUT /songs/:id(.:format) songs#update
DELETE /songs/:id(.:format) songs#destroy
GET /get_albums_of_artist/:artist_id(.:format) songs#get_albums_of_artist
Remove the # symbol in your anchor string and call anchor: within the url helper method: redirect_to comments_path(anchor: 'anchor_tag')
Alright, from rails DOC url_for() method should return URL of given object.
redirect_to "#{url_for(#commentable)}#comments"
if its nested then url_for([#product, #comment])

link_to not passing params properly

the view
<td><%= link_to "+1", :controller => :profiles, :action => :addpoints, :profile_id => profile.id, :task_id => #task.id%></td>
When trying to access profile.id via :profile_id rails returns an error, the id was not passed at all. How do I fix this? What's the best way to pass two params through two models? rake routes
Prefix Verb URI Pattern Controller#Action
welcome_index GET /welcome/index(.:format) welcome#index
static_pages_home GET /static_pages/home(.:format) static_pages#home
static_pages_dashboard GET /static_pages/dashboard(.:format) static_pages#dashboard
static_pages_pending GET /static_pages/pending(.:format) static_pages#pending
static_pages_taskcompleted GET /static_pages/taskcompleted(.:format) static_pages#taskcompleted
tasks_index GET /tasks/index(.:format) tasks#index
tasks_complete GET /tasks/complete(.:format) tasks#complete
tasks_delete GET /tasks/delete(.:format) tasks#delete
profiles_addpoints GET /profiles/addpoints(.:format) profiles#addpoints
profiles_index GET /profiles/index(.:format) profiles#index
root GET / static_pages#home
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
tasks GET /tasks(.:format) tasks#index
POST /tasks(.:format) tasks#create
new_task GET /tasks/new(.:format) tasks#new
edit_task GET /tasks/:id/edit(.:format) tasks#edit
task GET /tasks/:id(.:format) tasks#show
PATCH /tasks/:id(.:format) tasks#update
PUT /tasks/:id(.:format) tasks#update
DELETE /tasks/:id(.:format) tasks#destroy
profiles GET /profiles(.:format) profiles#index
POST /profiles(.:format) profiles#create
new_profile GET /profiles/new(.:format) profiles#new
edit_profile GET /profiles/:id/edit(.:format) profiles#edit
profile GET /profiles/:id(.:format) profiles#show
PATCH /profiles/:id(.:format) profiles#update
PUT /profiles/:id(.:format) profiles#update
DELETE /profiles/:id(.:format) profiles#destroy
Replace profile.id with #profile.id. Verify that profile is actually an instance. A nil value may be being passed in (as opposed to things being wired incorrectly).
Can we see the method content ?
If the error is about the id, the route is correct. What's in params[:profile_id] ? We need more info here..
I think this is what you wanted to do in Rails 4 way.
<%= link_to "+1", profiles_addpoints_path(:profile_id => profile.id, :task_id => #task.id) %>
That code above will call addpoints method in profiles controller with parameter {:profile_id => profile.id, :task_id => #task.id}. You can access parameter like this.
params[:profile_id] and params[:task_id].
Another thing that's worrysome about your code is that in the routes.rb, profiles_addpoints route is called via GET HTTP verb. This is potentially dangerous because Google search bots will visit these paths and result in a spike in upvotes. Respect HTTP convention and use PUT.

The action 'facebook' could not be found - devise/omniauth

I'm trying to implement facebook authentication in my app following this guide
After authorizing on Facebook I get the following:
Unknown action
The action 'facebook' could not be found for Devise::OmniauthCallbacksController
I've got the method implemented in app/controller/users/omniauth_callbacks_controller.rb as:
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def facebook
# You need to implement the method below in your model (e.g. app/models/user.rb)
#user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user)
if #user.persisted?
sign_in_and_redirect #user, :event => :authentication #this will throw if #user is not activated
set_flash_message(:notice, :success, :kind => "Facebook") if is_navigational_format?
else
session["devise.facebook_data"] = request.env["omniauth.auth"]
redirect_to new_user_registration_url
end
end
end
My route for the callback is:
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
Is there something I'm missing? How can I go about debugging this?
Thanks!
Update: Added output of rake routes (sorry for the length):
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_omniauth_authorize /users/auth/:provider(.:format) devise/omniauth_callbacks#passthru {:provider=>/facebook/}
user_omniauth_callback /users/auth/:action/callback(.:format) devise/omniauth_callbacks#(?-mix:facebook)
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
help /help(.:format) static_pages#help
about /about(.:format) static_pages#about
contact /contact(.:format) static_pages#contact
users_new GET /users/new(.:format) users#new
signup /signup(.:format) users#new
new_certificate /new_certificate(.:format) users#newcertificate
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
new_user_session GET /users/sign_in(.:format) devise/sessions#new
POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_omniauth_authorize /users/auth/:provider(.:format) users/omniauth_callbacks#passthru {:provider=>/facebook/}
user_omniauth_callback /users/auth/:action/callback(.:format) users/omniauth_callbacks#(?-mix:facebook)
POST /users/password(.:format) devise/passwords#create
GET /users/password/new(.:format) devise/passwords#new
GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
GET /users/cancel(.:format) devise/registrations#cancel
POST /users(.:format) devise/registrations#create
GET /users/sign_up(.:format) devise/registrations#new
GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
GET /users/auth/:provider(.:format) users/omniauth_callbacks#passthru
courses GET /courses(.:format) courses#index
POST /courses(.:format) courses#create
new_course GET /courses/new(.:format) courses#new
edit_course GET /courses/:id/edit(.:format) courses#edit
course GET /courses/:id(.:format) courses#show
PUT /courses/:id(.:format) courses#update
DELETE /courses/:id(.:format) courses#destroy
enrollments GET /enrollments(.:format) enrollments#index
POST /enrollments(.:format) enrollments#create
new_enrollment GET /enrollments/new(.:format) enrollments#new
edit_enrollment GET /enrollments/:id/edit(.:format) enrollments#edit
enrollment GET /enrollments/:id(.:format) enrollments#show
PUT /enrollments/:id(.:format) enrollments#update
DELETE /enrollments/:id(.:format) enrollments#destroy
submissions GET /submissions(.:format) submissions#index
POST /submissions(.:format) submissions#create
new_submission GET /submissions/new(.:format) submissions#new
edit_submission GET /submissions/:id/edit(.:format) submissions#edit
submission GET /submissions/:id(.:format) submissions#show
PUT /submissions/:id(.:format) submissions#update
DELETE /submissions/:id(.:format) submissions#destroy
honour_code_signatures GET /honour_code_signatures(.:format) honour_code_signatures#index
POST /honour_code_signatures(.:format) honour_code_signatures#create
new_honour_code_signature GET /honour_code_signatures/new(.:format) honour_code_signatures#new
edit_honour_code_signature GET /honour_code_signatures/:id/edit(.:format) honour_code_signatures#edit
honour_code_signature GET /honour_code_signatures/:id(.:format) honour_code_signatures#show
PUT /honour_code_signatures/:id(.:format) honour_code_signatures#update
DELETE /honour_code_signatures/:id(.:format) honour_code_signatures#destroy
root / static_pages#home
Worked out what I had set up incorrectly! I initially followed a tutorial for Devise and added this to my routes:
devise_for :users
Then I followed the omniauth tutorial and added the following for the callbacks:
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
Somehow these must have been conflicting as simply removing the first record points the callback in the correct direction (it must have been looking to the Devise class that I sub-classed Devise::OmniauthCallbacksController).

Weird issue with my rails path and its routing

I'm getting a strange error with my routing. I've installed the blogit gem but I don't think this is causing this problem.
undefined local variable or method `locations_path'
Here is my routes file:
AppName::Application.routes.draw do
devise_for :users
root :to => 'locations#index'
mount Blogit::Engine => "/blog", :as => "blog"
resources :locations do
collection do
get 'location'
end
end
and here's my rake routes:
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
root / locations#index
blog /blog Blogit::Engine
location_locations GET /locations/location(.:format) locations#location
locations GET /locations(.:format) locations#index
POST /locations(.:format) locations#create
new_location GET /locations/new(.:format) locations#new
edit_location GET /locations/:id/edit(.:format) locations#edit
location GET /locations/:id(.:format) locations#show
PUT /locations/:id(.:format) locations#update
DELETE /locations/:id(.:format) locations#destroy
Routes for Blogit::Engine:
/posts/page/:page(.:format) blogit/posts#index
tagged_blog_posts /posts/tagged/:tag(.:format) blogit/posts#tagged
post_comments POST /posts/:post_id/comments(.:format) blogit/comments#create
post_comment DELETE /posts/:post_id/comments/:id(.:format) blogit/comments#destroy
posts GET /posts(.:format) blogit/posts#index
POST /posts(.:format) blogit/posts#create
new_post GET /posts/new(.:format) blogit/posts#new
edit_post GET /posts/:id/edit(.:format) blogit/posts#edit
post GET /posts/:id(.:format) blogit/posts#show
PUT /posts/:id(.:format) blogit/posts#update
DELETE /posts/:id(.:format) blogit/posts#destroy
root / blogit/posts#index
Any suggestions as to why this may be happening would be great.
Thanks,
James
This was an issue with my blogit configuration.
People can find the full thread here:
https://github.com/KatanaCode/blogit/issues/8
Thanks for all your help!
James

Resources