Displaying 20 results from an estimated 110 matches similar to: "Devise Authorization Error"
2011 Nov 02
1
getting devise to return json data when signing out
Hi all,
In curl (the command line program), I can successfully log a user in
using devise:
def create
respond_to do |format|
format.json {
if user_signed_in?
return render :json => {:success => true, :errors =>
["Already logged in."]}
end
resource = warden.authenticate!(:scope =>
resource_name, :recall =>
2013 Jul 05
0
Sign in and sign out
Hello,
My name is Javier Molina and I am programming a simple app to manage users
in Ruby on Rails.
I read RoR Tutorial
from http://ruby.railstutorial.org/chapters/sign-in-sign-out#top to sign in
and sign out my app. I implemented the same configuration as it said:
*sessions_helper.rb*
def sign_out
self.current_user = nil
cookies.delete(:remember_token)
end
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here:
http://railstutorial.org/chapters/sign-in-sign-out#top
At the end of the tutorial, rails is erroring (see below). being new
to Rails and after having checked the tutorial... How do you resolve
this kind of error. It''s saying current_user is not defined, and it is
supposed to be defined with/Sites/sample_app/app/helpers/
2011 Jul 14
10
Devise confusing routes
I had a similar problem yesterday.
I would go to the root of my site and I would get a Too Many Redirects
message. It seems like there was an infinite loop. After struggling for
over an hour yesterday late at night, it seemed like I fixed it.
But now, when I want to create a New User, it''s redirecting me to the
Sign In screen. Seems like I didn''t fix the problem completely.
I
2010 Jan 17
0
some routes don't load in production
This one is really tricking me out. I''ve made a minimal sample app
that reproduces the problem I''m facing, it''s at
http://github.com/carpeliam/plogger_ts_devise_problem_example. Some
minimal explanation is there as well, the rest of this note is both
backstory and elaboration. I''m developing a blogging plugin
http://github.com/carpeliam/plogger which is
2012 Feb 04
0
ActiveRecord Associations not working in RSpec with Devise
Hi everyone,
I have the following classes:
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :timeoutable,
:recoverable, :rememberable, :trackable, :validatable
has_many :comments, :dependent => destroy
...
end
class Comment < ActiveRecord::Base
belongs_to :user
belongs_to :commentable, :polymorphic => true
...
end
In rails console,
2013 Mar 07
0
custom table_name for table users with devise
Hi
for my app, I have several tables for users (franceusers, belgiumusers,
...) and I would like to use one or another depending on domain
I tried with table_name_prefix and table_name but it seems to not work
class User < ActiveRecord::Base
rolify
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and
2013 Jul 04
3
Rspec devise, testing extended RegistrationController action destroy
Hi everyone,
I have devise 1.5.4 working with rails 3.0.20 and ruby 1.8.7 .
I have extended the destroy action from the RegistrationController, to soft
delete users instead of really deleting them from the database.
def destroy
# raise resouce.inspect # this is just to see if the test hits the
action
resource.soft_delete
set_flash_message :notice, :destroyed
sign_out resource
2011 Jun 11
1
Having a problem adding a foreign key
I keep getting this exception "SQLite3::SQLException: no such
column: books.user_id: SELECT "books".* FROM "books" WHERE
("books".user_id = 4)" ,which sounds like there is no user_id in books
table.So i just installed foreigner plugin and added "
t.integer :user_id, :null => false" and
"add_foreign_key(:books, :users)" in book
2011 Aug 05
6
"bundle install" fails because of git gem
Hey everyone,
I''m having an incredibly difficult time getting bundle to work
properly on my production server.
My production server setup:
Ubuntu 10.04
Ruby 1.9.2p290
Rails 3.0.4
Passenger
rvm 1.6.32
My Gemfile (relevant parts):
gem ''linkedin'', :git => "https://github.com/renatosnrg/linkedin.git"
Whenever I try to do "bundle install" I get this
2011 Jun 26
0
[PATCH] mkfs.btrfs: Fix compilation errors with gcc 4.6
gcc 4.6 complains about several possible use-before-initialise cases
in mkfs, and stops. Fix these by initialising one of the variables in
question, and using the correct error-handling paths for the
remainder.
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
mkfs.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/mkfs.c b/mkfs.c
index 3a87d6e..edd7018
2007 Mar 19
2
Wine crash
Hello,
I can't use Wine from version >=0.9.18 anymore.
It compiles ok and then it crashes somewhere in the middle of
installation,
I think when Wine tries to execute something.
Even when I try to run winecfg it crashes.
It worked with Wine version 0.9.17 and lower.
Anyone have any idea what's wrong ?
I'm running Slackware 10.0.
Below is what happens when I try to run winecfg.
2015 Dec 03
2
7.2 kernel panic on boot
On 03/12/15 10:39, Greg Lindahl wrote:
> On Thu, Dec 03, 2015 at 11:28:10AM +0100, Leon Fauster wrote:
>> Am 03.12.2015 um 11:08 schrieb Greg Lindahl <lindahl at pbm.com>:
>>> I wanted to help you by making sure that you were on the most recent
>>> version, but, looking at the Centos.org website I was unable to figure
>>> out if 7.2 was the tip. 7.1503? Is
2011 Aug 10
3
STI Devise, remove sign up for admin
Hi,
If I''m using STI with Devise, I have a Admin model inheriting the base
Devise User model. I would like to remove ''registerable'' from the
Admin model but it inherits registerable from the user model. How
would i disable registration for admins?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2005 Dec 27
0
can not setup ie and fonts problem
My operating system is fedora 4 for x86_64 and the linux kernel is
2.6.14.My wine version is 0.92.After complete installation,I try to
setup ie6 sp1.But I get the following message.How can I solve it?And the
fonts in winefile explore look so ugly.I show the snapshot in
attachment.By the way my system locate is seted to be zh_CN.
WINEDLLOVERRIDES="advpack=n" wine ie6setup.exe
2005 Aug 27
0
unhandled exception on 20050725 install from source on Fedora Core 4
I'm running FC4 with all the latest patches and kernel. I checked the basic
requirements for installation for all necessary packages.
Using the unpacked source, I installed by ./tools/wineinstall per the
readme. I got a long series of errors well into the process, posted below -
I've read the documentation and several help sites including this group and
the user list but can't seem to
2011 Nov 05
13
Adding a site admin user while creating a site
Hi Gurus,
I wanted to add siteadmin user(basically a user with a certain role) while
creating the site itself. I hope that i have done all the necessary stuff
by going through raynb''s railscasts (
http://railscasts.com/episodes/196-nested-model-form-part-1) But could not
see user fields being displayed in the site creation form.. Below are the
details.
I Have two model users and
2011 Nov 01
7
corrupted btrfs after suspend2ram uncorrectable with scrub
Hello,
I''m using kernel 3.1.0 and I have both / and /home as btrfs. I used
suspend to ram quite often and never had a problem, but yesterday I''ve
suspended to get into a plane and when I resumed my /home was all
about input/output errors. Reboot did not help either. My root (/)
did not suffer any problems.
Today I''ve upgraded btrfs-progs to latest GIT and tried scrub
2006 Nov 04
0
traits-0.9.2 - better living through metaprogramming
URLS
http://rubyforge.org/projects/codeforpeople/
http://codeforpeople.com/lib/ruby/traits
ABOUT
traits.rb is set of attr_* like methods on steroids, caffeine, and botox. it
encourages better living through meta-programming and uniform access
priciples. traits.rb supports smart inheritence of class attributes and a
fistful of hooks for veryifying and munging attr values.
2005 Mar 31
1
exclude_dir option for VFS recycle module
Hello all,
I am testing the VFS recycle module, and have a question.
The module is working the way I hoped with the exception of the
exclude_dir option. I have an entry like:
exclude_dir = dir1 -- files I place in dir1 are not sent to the recycle
location. However, if I have a folder beneath dir1 like dir1/dir2, files
in dir2 get sent to the recycle location. I've tried using wildcards in