Displaying 20 results from an estimated 1000 matches similar to: "Stop an action ?"
2005 Dec 15
2
Auth_generator: to handle users
Hi everyone,
I have made an announcements few weeks ago about auth_generator. As we
released few versions since, I send another one on the list.
The auth_generator gives you an admin interface to handle users, can
display user informations on static pages, allows you to choose what
crypting algo you want to use (you can use a salt per account if you
want for better security) and much more.
You
2006 Dec 11
0
auth_generator 2.0.1 undefined method `login_required' for ... ArticlesController
I am a relative RubNub and attempting to implement auth_generator v.2.0.1.
I am getting an "undefined method `login_required'' for
#<ArticlesController:0xb732c0b4>" error when I attempt...
http://localhost:3000/articles/new
Help would be appreciated.
My app/controllers/application.rb reads...
------------------------------------------------------------------------
2006 Apr 27
2
problematic admin/views
ok, i have a pretty almost finished (frontend) blog, i have defined an
admin zone with authentication to add content, now im getting trouble
with the views for the controllers in the admin zone, here you can see
my file structure:
http://img284.imageshack.us/my.php?image=tmpviews6oq.gif
and my admin controllers like this:
controllers/admin/admin_controller.rb
class Admin::AdminController
2010 Dec 15
5
Having trouble testing :( "superclass mismatch" and can't load "test_helper"
I''m having trouble testing my Rails 3 application. Unit testing
doesn''t work. If I try ruby article_test.rb directly, I get a "no
such file to load" error, and if I try rake test:units or ruby unit/
article_test.rb I get this odd "superclass mismatch for class
ArticlesController" error!
I''m hoping I can get this settled...
My test files were
2006 Jan 29
3
SHLG and lib dir
Slowly figuring out how to get my SaltedHashLoginGenerator stuff working. The wiki page
says to put "before_filter :login_required" in the user (my "user" is "member") controller
or in ApplicationController. However, wherever I put it I get NoMethodError.
The rest of the SHLG stuff seems to be working... or at least I could get to the signup
page, register, 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!
2007 May 21
4
Just upgraded to 1.0.0, should render_text isn''t working for me
I finally got around to upgrading from 0.8.2 (!!). I had a spec which
looked like
specify "should render abc123" do
controller.should_render :text => "abc123"
get :key
end
With 1.0.0, the new spec is
it "should render abc123" do
get :key
response.should render_text("abc123")
end
However it doesn''t work, giving me the error:
undefined
2005 May 17
5
Strings, Variables and GetText
Hi,
I''m starting to use GetText and have this code:
render_text %(<script language="JavaScript" type="text/javascript">
parent.mainframe.onUpdateNew("Gallery <b>#{@media.name}</b> was
successfully created.",
"#{@media.name}","#{String(@media.id)}","#{@media.media_type}");
</script>)
I need to convert
2007 Jul 30
6
Object.stubs doesn''t seem to work.
Hi
I''m using Mocha 0.5.3 and I want to stub out a call to Time.now, just
like the example in the post
http://blog.floehopper.org/articles/2007/06/08/mocha-0-5-released
However, trying it in irb gets me the following error:
>> require ''mocha''
=> true
>> Time.stubs(:now).returns(Time.parse(''Thu Feb 01 00:00:00 UTC 2007''))
NoMethodError:
2007 Sep 29
2
REXML - XML query only returning one (last) result
I''m really new to Ruby on Rails, and I''m trying to read an XML file
with REXML. No matter what I try, I am only getting the last result
returned from my query. I should be getting 365 results. Here is the
code:
include REXML
require ''rexml/document''
require ''rexml/xpath''
class MakeFootprintController < ApplicationController
def index
2005 Dec 26
3
probably a very dumb question
why does <%= render_text "hey ya" %>
cause ''undefined method `render_text'' for
#<#<Class:0x3851120>:0x3851000>''
can i use render text in a template?
--
Posted via http://www.ruby-forum.com/.
2006 Feb 27
3
Send parameter along with method in before_filter
Hello list,
I have an app that has a very simple authorization scheme. A person can have
many roles and roles can have many people.
In my app, I''d like to do
before_filter :login_required (since no role name is provided, it accepts
any users with credentials)
before_filter :login_required ("administrator") (only accepts those with
role administrator)
before_filter
2007 Aug 15
4
nuby: how spec redirect_to at ApplicationController
Good morning rspec people!
Still rspec nuby: I must do something wrong obviously.
How can I spec about redirect_to at ApplicationController
describe ApplicationController do
it "method login_required should redirect to home path without login" do
pending "I tried to use controller.login_required.should be_redirected
and got NoMethodError with nil object
2016 Apr 10
5
what is the faster way to search for a pattern in a few million entries data frame ?
Hi Duncan,
> Didn't you post the same question yesterday? Perhaps nobody answered
> because your question is unanswerable.
sorry, I got a email that my message was waiting for approval and when I
look at the forum I didn't see my message and this is why I sent it
again and this time I did check that the format of my message was text
only. Sorry for the noise.
> You need to
2010 May 27
3
before_filter always running in test, not in development or production mode.
I''m using Shoulda and restful_authentication on Rails3 and whenever I
run my tests a before filter for login_required is always triggered,
despite my filter being set up as:
before_filter :login_required, :only =>
[:update, :edit, :suspend, :unsuspend, :destroy, :purge]
My test is this:
context ''A guest to the site'' do
context ''on GET to
2006 Apr 03
9
Problem with Windows not finding methods
I am running (testing) a noob-tube for myself as follows:
Windows XP SP2
lighty
ruby 1.8.x
rails 1.1
scgi
I have everything working fairly well, but with one minor exception:
the actions that I have defined as follows are not found.
class MytestController < ApplicationController
def index
render_text "Hello Nurse!"
end
def dilbert
render_text "Dilbert
2006 Apr 03
3
SaltedHashLoginGenerator Verification Trouble
Hello all,
Any help with this one is MUCH appreciated. I am running Ruby 1.84 and
Rails 1.1.0 on Win32 with a local SMTP server. I can successfully send a
signup confirmation email with a confirmation link, but when I click on
the link, it says that I am logged in, but it never verifies the
account. This is the link provided by the system:
2016 Apr 10
0
what is the faster way to search for a pattern in a few million entries data frame ?
Hi Fabien,
I was going to send this last night, but I thought it was too simple.
Runs in about one millisecond.
df<-data.frame(freq=runif(1000),
strings=apply(matrix(sample(LETTERS,10000,TRUE),ncol=10),
1,paste,collapse=""))
match.ind<-grep("DF",df$strings)
match.ind
[1] 2 11 91 133 169 444 547 605 734 943
Jim
On Mon, Apr 11, 2016 at 5:27 AM, Fabien Tarrade
2009 Mar 05
4
before_filter :action_name OR :action_name
Hi there
I am wondering if we can use before_filter in the form of :action
OR :action
what i want to do is to implement one of the actions, if the first
failed, then go to the second
when i use
before_filter :action1
before_filter :action2
each method will run them, my case is that i want to check if one of
them is true and not both
any idea?
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
Hi,
I just installed Rails 2.0.2
[root@mymachine easyx]# ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
[root@mymachine easyrx]# gem install rails --include-dependencies
Need to update 16 gems from http://gems.rubyforge.org
................
complete
Successfully installed rails-2.0.2
[root@remandev easyrx]#
But I''m getting this error in my restful_authentication