Displaying 20 results from an estimated 1000 matches similar to: "Mocking models provided in Rails plugins"
2009 Jul 13
6
first app on Dreamhost with Passenger : "rails needs to know your username and password" ?
I am trying to deploy my first rails app with Dreamhost. I ftp''d over
my existing app, turned on Passenger and pointed it to my /public
directory. When I go to ''www.mydomain.com'' I get the ''Ruby on Rails:
Welcome aboard'' default page, including the following:
Getting started
Here’s how to get rolling:
1.
Create your databases and edit
2008 Sep 12
1
restful_authentication rspec failures "Mysql::Error: Incorrect datetime value:"
I am getting 193 failures that all have "Mysql::Error: Incorrect
datetime value:"
how do i fix this??? i am new to rspec and restful_auth, so if i am
doing something wrong, let me know!!!
windows xp
rails 2.1.1
rails testproject
cd testproject
# create my databases and edit database.yml
git init
git submodule add git://github.com/dchelimsky/rspec.git vendor/plugins/
rspec
git
2007 May 30
2
should_eql etc?
Hi, I''m trying the specs for restful_authentication I found here
http://jonathan.tron.name/articles/2007/01/02/rspec-on-rails-restful-
authentication
It seems to use custom .should methods: should_eql,
should_be_an_instance_of, should_redirect_to, should_be_success,
should_not_be_nil, should_be_nil, should_not_be_nil, should_be_empty,
should_be_success, should_not_change, and
2008 Mar 19
7
Upgrade to 2.0.2: InvalidAuthenticityToken error on 1st POST
All,
I''ve upgraded to 2.0.2, and I can''t get my login screen (the first POST
request in the application) to work.
When I post this form, I see the "InvalidAuthenticityToken" error.
I have
protect_from_forgery :secret => ''my_secret''
set in application.rb
and I am using an active_record session store based on this line in
environment.rb:
2007 May 26
11
RSpec
Hi RSpec Mailing list,
I''m new to RSpec and I am trying to get it running with the caboo.se sample
rails app.
I installed the current version of rspec with rspec_on_rails
I tried to run rake spec but received:
330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec
(in /Users/multimedia/Desktop/restful_auth_rspec)
2008 Apr 15
4
InvalidAuthenticityToken exception when deleting cookies
Hello,
I''ve been testing my project with some manual tests. One of them
consists of deleting cookies ("clean personal info" in firefox) just
before submit the login form. Then, I get an error.
The error message is: ActionController::InvalidAuthenticityToken in
SessionsController#create
I''m on Rails 2.0.2 with restful_authentication plugin. I''m using
2007 Aug 30
8
experimental rails story adapter in trunk
For those of you interested in getting a jump on learning about and
using the new Story Runner in a Rails app, I''ve added an experimental
Rails-Story adapter to trunk.
You can see how to use it here:
http://pastie.caboo.se/92320
This is PURELY EXPERIMENTAL, however it actually works and will likely
not change much in the way that it does work.
Happy hacking!
David
2009 Oct 18
4
NoMethodError in User sessionsController#new
I''m setting up authentication with Authlogic and I get this error.
I''ve done some searching but with no success. I tried setting the
current_user method in Application_controller to protected and not
private, on the recommendation in Stack Overflow.
Error in browser-----------------
NoMethodError in User sessionsController#new
undefined method `require_no_user'' for
2008 Dec 11
2
restful_authentication errors
When I run
[code] script/generate authenticated user --include-activation [/
code]
it seems to work at first, but then it reports:
" The name ''SessionsHelper'' is either already used in your application
or reserved by Ruby on Rails. Please choose an alternative and run
this generator again "
I''ve heard that having both acts_as_authenticated and
2007 Dec 03
18
Need help mocking this out
Let''s say you''re using the restful_authentication plugin.
You have a model called articles. On the index action of the
articlescontroller you simply want to spec out that it''ll scope the results
to the ownership of the current_user.
It should NOT include any articles other than the articles that user owns.
How would you properly spec this out?
Thanks for the help!
2011 Jul 30
22
Question about Helpers
Studying the RoR 3 Tutorial book by Michael Hartl
and on page 345 there''s the code inside the SessionsHelper:
_________________________________________________________
module SessionsHelper
def sign_in(user)
cookies.permanent.signed[:remember_token] = [user.id, user.sault]
self.current_user = user
end
end
__________________________________________________________
What is the purpose
2019 Jan 16
1
[hivex PATCH] perl: fix format of croak for RLenValue
When calling croak on failure in the Perl code for RLenValue, add the
%s placeholder for the strerror result. This makes the croak call just
like all the others.
Fixes commit 87e1be8ff3431ac81d721d5f647fc85d02e045dc.
---
generator/generator.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generator/generator.ml b/generator/generator.ml
index 0401217..f2cb627 100755
---
2008 Sep 08
2
Restful Authentication and State Machine state transfer question
I''m adding some code to a project using restful_authentication and
acts_as_statemachine
In the create method for a user there is the following code generated
by the restful_authentication template
@user.regster! if user.valid?
And this will save and the user record if it is valid. I understand
that the statemachine will then change the state from passive to
pending. It will guard
2009 Aug 02
13
NoMethodError in User sessionsController#create - Authlogic
Hi,
I''m beginner in rails, and I wanted to add to my simple application
Authlogic. So I''ve watched http://railscasts.com/episodes/160-authlogic
and step-by-step done everything. And almost everything works fine,
except login in. After registration new user is automatically logged in,
he can edit his profile, but after clicking logout and trying to login
again I get error
2006 Nov 23
1
Script to restart webrick
Enjoy this little script to restart webrick:
#!/bin/sh
pid=$(ps -o pid,command | grep ''\<ruby script/server\>'' | awk ''{print
$1}'')
kill -9 $pid
ruby script/server
Run on prompt by entering: sh scriptname.sh
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2007 May 23
3
User Login (process_login)
Hiya - before I start let me tell you i''m a Nuby on Rails.
I''ve created a user registration within my application that requires
email validation and that seems to be working fine.
I''m now creating the user login page and have the following code in my
UsersController:
def login
@user = User.new
@user.username = params[:username]
end
def
2012 Feb 03
10
ruby on rails 3 tutorial book chapter9 Signin Failure
Hi I have problem trying to pass the signin failure test.
This is the test code of the sessions_controller.rb
def create
user = User.authenticate(params[:session][:email],
params[:session][:password])
if user.nil?
flash.now[:error] = "Invalid email/password combination."
@title = "Sign in"
render
2008 Mar 14
1
how do I get a older version of restful_authentication
I''m currently running rails 1.2.6 and I''ve got the new
restful_authentication running, unfortunately, the new version of the
plugin does not support the older rails very well.
how can I get an older version of restful_authentication (pre rails
2.0.2)?
I''m getting this error:
undefined method `authenticate_with_http_basic'' when I put
"include
2006 Jun 01
5
History plugin
Hello,
I felt annoyed enough when having to redirect user back to their
previous location in a hackish way that I wrote this plugin.
It avoids storing POST and Ajax request. It also has a facility to
specify actions not to store in the history.
If you are interested, it''s there:
http://blog.cosinux.org/pages/rails-history
See you all,
Damien
--
Damien MERENNE
2007 Dec 30
6
Restful-Authentication Rspec Failure Rails 2.0.2
I am trying the Restful-Authentication (latest version, downloaded
today) and upon running the generator, doing the migration, prepping
the test system and putting the resources in routes.rb I get a Rspec
test failure:
''SessionsController logins and redirects'' FAILED
expected not nil, got nil
routes.rb has:
map.resources :users
map.resources :sessions
nothing else was