Displaying 20 results from an estimated 1500 matches similar to: "Rspec devise, testing extended RegistrationController action destroy"
2013 Apr 12
4
rails named scopes and sql injection
HI guys,
I just came through an example on code of the place I work for that said
something like this could be vulnerable to sql injection attacks:
scope :with_name, lambda { |name| where("LOWER(name) LIKE ?",
name.downcase) }
I wonder if this is true. My thought is that rails should escape this and
that anything that tried to do something different would fail on the
translation
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
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 =>
2011 Feb 14
0
Devise is causing the [The change you wanted was rejected.] Error...
I am using the custom made Devise controller.
I moved from PHP to Rails that, old users password are stored in
Devise:user table in form of
"devise_encryption(oldencryption(password))"
If an user login, and app finds out that this user''s password is in
form of "devise_encryption(oldencryption(password))", I then change it
in to a form of
2011 Jun 13
0
Devise Authorization Error
Hello everyone,
I am new to rails and I am having some trouble getting the Devise
authorization plugin working. I can get the login page to display, but
when I enter the credentials for a known user (I seeded an account to
the database) it just says "Invalid email or password," even though
I''m 100% sure I entered the right information, and redirects me to the
login form.
2012 Feb 01
6
Does Devise make use of a "status" method? Weird bug.
So I''ve inherited a legacy application and I''m trying to work around the
edges as I put an admin tool interface on top of the existing code base.
I install Devise for user authentication, since I''ve used it in the
past. I change none of the default code. And yet, on successful sign
in, I get an error:
Render and/or redirect were called multiple times in this action.
2010 Dec 17
1
flash[;notice] not display after redirection
I read all previous posts about the same subject in Devise group but
couldn''t find any answer, so iy may not be related to Devise , so
I debugged it ..
.
class Users::RegistrationsController <
Devise::RegistrationsController
..
# POST /resource/sign_up
def create
build_resource
if resource.save
if resource.active?
set_flash_message :notice, :signed_up
2011 Feb 06
2
Controller Testing + Devise = boom (undefined @controller, request)
Here I am, trying to learn TDD and BDD. Getting start, most simple
case, and the world is falling apart:
My test code:
it "should respond with success" do
puts ''hi''
# get :new
# response.should be_success
end
My stack trace:
$ rspec spec
"controller: nil"
F
Failures:
1) VideosController new exposes request and response before and
2011 Aug 25
1
Devise + Forem: undefined method weeks on Fixnum
I''m getting the following message when trying to start Webrick or
console.
... devise-1.0.11/lib/devise.rb:89:in ''<module:Devise>'': undefined
method ''weeks'' for 2:Fixnum (NoMethodError)
After trying to upgrade my app to Rails 3.1 (edge) so that I may use the
Forem engine.
I''m under the impression this error is occurring because
2013 Jun 16
0
Monkey patching a gem's controller method
I want to change the keys Devise is using in flash alerts. (Devise uses
:notice and :alert flash keys, but I want to change them to :success and
:error so that I can display nice green/red boxes with Bootstrap.)
To that end, I want to monkey patch the `set_flash_message` method in
2011 Nov 21
0
How to use two different sets of mailer templates for two different Devise models?
I''m using Resque to send Devise emails. To do so I set:
devise.rb
config.mailer = "Mailers::Devise::DeviseMailer"
But I have 2 devise models -- User and Client. I want to send
different devise mailer templates for each.
devise.rb says "The first four configuration values can also be set
straight in your models.", and config.mailer is one of those first
four, but
2013 Jul 09
2
can i use single devise for multiple models.
Hi,
i need to use authentication for the 4 models,is it possible to use
single devise for all models,if yes plz let me know them clearly.
if not what is the solution.
Thankyou
--
Posted via http://www.ruby-forum.com/.
--
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
2012 Feb 24
3
Devise generates Mailer by its own?
Rails 3.1.3
Hi. I''m a little confused with Devise and ActionMailer.
It seems that Devise has its own way of sending mails through
ActionMailer.
Does it generate Mailer class when "rails g devise..." command is
executed?
Or do I need to do some special command in order to generate Mailer?
I have certainly set up a devise User table but there is no Mailer class
for it,
2010 Nov 03
3
|Newbie] Change default locale I18n file devise.
Hello!
This is probably something easy. I''ve looked at some documentation but
I didn''t find any good resources on how to change to default locale
file with Devise authentication plugin. Should I do it in my
application controller or should I change something in Devise? And how
should I do it.
Thanks
// Anders
--
You received this message because you are subscribed to the
2012 Feb 28
0
Devise with two emails
Hi, I''m trying to setup a User model with devise, and I want it to have two
emails (personal and work, for example).
And I want them to work as the normal email from devise, except that the
login will be done with a username attribute. But the emails that devise
will send, I expect to be delivered to both emails.
I also want all the normal email validations on both emails (done by
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
2012 Aug 18
0
Migrating users from devise to bcrpyt-ruby
Hi guys,
How would one migrate users on a rails site using the devise gem for
authentication to using the bcrpyt-ruby gem(has_secure_password rails
option) for the same? I know that both use bcrpyt, but devise has the
stretches and pepper configurations in the devise.rb file and I''m a little
uninformed on how to translate these for the bcrypt-ruby gem.
Is the pepper configuration
2011 Jun 27
0
Devise Invitable mailer -- how to force text/plain e-mail?
I am using Rails 3.09 and the latest Devise and Devise Invitable. I am
able to make Devise send confirmation messages as text/plain just by
adding a view properly named to the views/devise/mailer folder.
Invitable keeps its views in views/users/invitations/mailer, but
changing the name of the file (and the contents) does not seem to
affect this at all. Instead, the view is being loaded
2010 Aug 09
0
Devise :current_password validations and checking (how???)
Hi Guys,
In my devise applications in Rails 3, I created a separate form under my
SettingsController class of which it handles the ''Change Password'' of
the User Model, so i can manipulate the current_user in the
SettingsController.
Now, I followed the set-up in the Devise/Views on how to update the form
using ''Change password'' and either way update User for
2012 Sep 25
1
Devise Gem
Hi all
i am learning how to implement devise gem but i just want to know do
i need to write the login code first and then runt this command " rails
generate devise:install " or run the command first and then go for login
code. can any one tell me what to do.
Cheers
Kp
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: