Displaying 20 results from an estimated 1000 matches similar to: "Want to Move RestfulAuthentication's UsersController to Admin::UsersController"
2014 Mar 24
0
"class Admin::UsersController < ApplicationController". What does the double colon do here?
I saw this on a Gem implementation and don't understand why it needed
"::UsersController" at all.
My understanding that it is trying to find the relative path of
UsersController, but why is it necessary to be there?
--
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
2014 Apr 17
0
RestClient::ResourceNotFound in UsersController#index
Hi,
I am trying to implement Rest Api for a sample application for learning
purpose. But when I try to make a "GET" request through the RestClient it
is showing error as
RestClient::ResourceNotFound in UsersController#index
def index
uri = "#{API_BASE_URL}/users.json" # specifying json format in the URl
rest_resource = RestClient::Resource.new(uri, USERNAME,
2010 Jul 13
1
NoMethodError in UsersController#show
So I am getting the error
NoMethodError in UsersController#show error
undefined method `feed'' for nil:NilClass
{"authenticity_token"=>"zalkdfsjfksjd;lfs;lfksdkf/2tPzo=",
"login"=>"session",
"password"=>"admin",
"commit"=>"Log in"}
Why is login being set to "session"? Instead of the
2010 Feb 25
9
uninitialized constant UsersController::User
i just created an application to list the primary details of
userbut it is showing an error lik this
"uninitialized constant UsersController::User"
this is my controlller
class UsersController < ApplicationController
puts"hiiiiiiiii"
def index
puts"hiiiiiiiii"
@users = User.find(:all)
puts @users
respond_to do |format|
format.html # index.html.erb
2012 Jun 09
7
ActiveRecord::AssociationTypeMismatch in UsersController#update
Hi
Im trying to link my User model to a Teams model. I seem to be getting
the following errors. Any help would be great as Im just new to RoR
Thanks
error
ActiveRecord::AssociationTypeMismatch in UsersController#update
Team(#2183395560) expected, got String(#2174675960)
app/controllers/users_controller.rb:67:in `update''
app/controllers/users_controller.rb:66:in `update''
2008 Sep 30
0
undefined method `authenticate_with_http_basic' for #<SessionsController:0xb6c47c44>
I am developing the rails with the flex.. I am following the tutorial
FLEXIBLE RAILS - PETER ARMSTRONG .
I followed the commands as specified in the tutorial.. my rails version is
1.2.3
and the ruby 1.8.6
I created the restful authentication and i specified the authentication..
ruby script\generate authenticated user sessions
...output omitted...
I specified everything.. It worked fine upto 500
2013 Mar 20
2
Rspec + Devise + BaseController
Hello there,
I''m creating a base controller for the admin section of a project. All
controllers whitin the admin section will inherit from it.
#####################################################
#app/controllers/admins/base_controller.rb
class Admins::BaseController < ApplicationController
layout "admin_cms"
before_filter :authenticate_admin!
end
2005 Dec 28
3
Module loading
I''ve looked high and low for the answer to this and can''t seem to find
anything that helps.
I have an admin section (much like Typo) where all controllers are based
on the Admin::BaseController.
My directory structure is
[RAILS]
-app
--controllers
---admin
----base_controller.rb
----products_controller.rb
Products controller is:
class Admin::ProductsController <
2006 Aug 08
2
Extending rails with plugins
I''ve been looking at bottling some functionality up into a plugin, but I''m
having some problems including it.
The structure I have is:
/app/controllers/admin/base_controller.rb:
class Admin::BaseController > ApplicationController
#snip#
end
/vendor/plugins/myplugin/lib/my_module.rb:
module MyModule
def new_func
"New Function"
end
end
2011 Jul 28
2
rails 3 routing error
Here''s the error:
1) SessionsController GET ''new'' should be successful
Failure/Error: get :new
ActionController::RoutingError:
No route matches {:controller=>"sessions", :action=>"new"}
# ./spec/controllers/sessions_controller_spec.rb:8:in `block (3
levels) in <top (required)>''
2) SessionsController GET
2011 Mar 30
0
Anonymous Subclass of ActionController::Base
I''m trying to spec a subclass of ActionController::Base using an
anonymous subclass but I am running into errors but I am receiving a
uninitialized constant StubResource
Here is my base class
class Admin::BaseController < ApplicationController
before_filter :etherweb_site
load_and_authorize_resource
layout "admin/admin"
protected
def etherweb_site
end
end
2012 Mar 07
0
LoadError: Expected X to define on gem upgrade
I''m upgrading to the latest version of ActiveAdmin and am running into the
following when trying to start the app:
Expected ../app/model/store/base.rb to define Base
base.rb defines base like:
module MyApp
class Store::Base
end
end
I''ve done some digging and found that ActiveAdmin did some refactoring to derive everything from a BaseController. It also depends on
2009 Sep 30
1
2 RESTful controllers for the same resource
Hi everyone I want to have two restful controllers for the same
resource (Users)
One controller (UsersController) is straight in the controllers folder
and is used for singup and so on
Then i need another controller for users which is inside an admin
folder (Admin::UsersController)
In my routes.rb i have
map.resources :users
# Sample resource route within a namespace:
map.namespace
2011 Jul 19
0
Ruby on Rails Tutorial Chapter 8 Signup Success
I have written the Users controller and Spec tests correctly for the
"successful creation" in the User controller however I get the
following two errors:
1) UsersController POST ''create'' success should create a user
Failure/Error: lambda do
count should have been changed by 1, but was changed by 0
#
2009 May 03
0
HTTP Auth 401 Even on Valid Login
I can''t understand why authenticate_or_request_with_http_basic keeps
failing even though I am entering the correct info.
If I try to access /admin/items/new, I enter the correct info but I
keep getting prompted.
The strange part is that when I cancel out, I get "HTTP Basic: Acce".
Here''s the controllers:
class Admin::BaseController < ApplicationController
2010 Nov 24
1
NameError in Devise/sessionsController#new
I created a sample application.
Added devise in it, it works fine.
Then added cancan gem into it.
Created an ability class. define some permissions.
Then added line
load_and_authorize_resource
to the Application Controller, after that when i go to the page
http://0.0.0.0:3000/users/sign_in it gave the following error,
NameError in Devise/sessionsController#new
uninitialized constant Session
2009 May 01
4
Can't get to an action in a RESTful controller
Folks,
I am using the restful_authentication plugin. This creates the users
controller which is declared as a resource in routes.rb as below
map.resources :users
Now in the UsersController I have created an action to resetpwd that I
am trying to get to from the login page when the user clicks "forgot
password". However, when I do that the log file tells me that the call
to
2012 Sep 05
0
Generate devise session controller
Hi Folks Good morning,
Am new to rails.
I used devise in my project ,i need to write some conditions in my session
controller.How can i generate devise session controller.
I have user.rb model.
Steps which i made:
1. Generate rails g controller session
2. Session controller generated
3. Changes the text like,
class Users::SessionsController < Devise::SessionsController
end
4.In routes i
2014 May 13
0
super is not working on after_sign_in_path_for(resource)
I have this:
class Users::SessionsController < Devise::SessionsController
def after_sign_in_path_for(resource)
super
end
super redirect to root_path and i dont want to do it. I need to redirect
other view
--
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,
2013 Aug 26
2
linkedin login using omniauth
Hi,
I am trying to add linkedin login feature in my rails application using
omniauth gem..I used omniauth gem for Fb login and it''s working fine..but
it''s not working for linkedin login
this is my code
/model/user.rb
class User < ActiveRecord::Base
attr_accessible :name, :oauth_expires_at, :oauth_token, :provider, :uid
def self.from_omniauth(auth)