Displaying 20 results from an estimated 3000 matches similar to: "Instance Variables within Controller during AJAX request"
2006 Aug 03
3
Calling/Executing javascript functions from controller
Hey all,
How can I call a javascript function from my controller?
Is it possible to simply call a javascript function
from directly in the controller WITHOUT needing an AJAX
request to come through via link_to_remote or remote form?
As an example I''ve tried:
class RandomController < ApplicationController
before_filter :login_required, :except => [:index, :initialize]
def index
2006 Aug 03
0
N00b question...but here it goes
Hey all,
How can I call a javascript function from my controller?
Is it possible to simply call a javascript function
from directly in the controller without needing an AJAX
request to come through via link_to_remote or remote form?
I''m not talking through an RJS link_to_remote AJAX etc.
As an example I''ve tried:
class RandomController < ApplicationController
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
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
2008 Nov 05
3
Problems w/ before_filter getting ignored
Hello,
I''m setting up an authentication module that will be called from
application.rb. I want to save a rrequest.request_uri into a
session to be used as a place holder that
will take users back to the page they were on before they logged in.
I''m trying to call the store_location method for all methods EXCEPT
login by putting login in an except before filter.
For some
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create a simple login
test from cucumber features. The feature statement is:
Given the user is not logged in
The step definition for this is confounding me. In the
application_controller the authlogic tutorial recommends the following:
private
def require_user
unless current_user
store_location
flash[:notice] =
2007 Feb 18
2
SerializationTypeMismatch in Production Mode
In production mode, I keep getting this error the 2nd time it loads a
page with a serialized attribute:
ActiveRecord::SerializationTypeMismatch (answers_container was
supposed to be a Array, but was a NilClass):
/vendor/rails/activerecord/lib/active_record/base.rb:1964:in
`unserialize_attribute''
In development, it works fine. In fact, if I set to false
config.cache_classes in
2009 Oct 28
1
Authlogic Page View Authentication Help
Hi:
I am a newbie at ROR, and I am grasping my head around Authlogic. I am
having hard time trying to figure out how can I do the following:
in my application controller I have the following helpers:
filter_parameter_logging :password, :password confirmattion
helper_method :all
private
def current_user_session
return @current_user_session if defined?
(@current_user_session)
2008 Jan 16
5
named route new_session not working
Anyone have any idea why a named route would NOT work? I did rake
routes to make sure it was there and it was but for some reason
new_session doesn''t work.
--
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 post to this group,
2008 Jan 17
0
It seems to be a restful_authentication bug (was Re: Re: named route new_session not working)
On 1/16/08, Jimmy Palmer <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:
>
> sorry for the ambiguity. I will work on being more descriptive. :)
>
> In the method access_denied in the file authenticated_system.rb from
> restful athentication, it generates this:
>
> def access_denied
> respond_to do |format|
> format.html do
>
2005 Mar 28
0
Handling return from modal pages on rails
Hi List,
I didn''t like the way store_location worked in rails. It doesn''t know
you''ve pushed the "back" button, and it always returns to the top of a
page. On a large page, the part you were looking at would no longer be
on the screen.
People try to deal with this using an AJAX hack, but it seems to me that
the proper way to fix it is to store the return
2005 Mar 07
2
Login generator question
Hello
I''m using the login generator on my application, and I found a problem
with it.
My application is a rack inventory thing, which shows a rack with
machines and KVMs and you can click on a rack item to show/edit/destroy
it. The edit and destroy actions are protected by the login generator.
Now say a user clicks on "destroy" for some machine. He''ll be shown the
2009 Dec 25
18
rescue_from ActionController::RoutingError II
OK ... so I''m not supposed to use it but ...
Why doesn''t rescue_from ActionController::RoutingError work witht he
code from
http://www.rubyplus.org/episodes/20-Extended-RESTful-Authentication-Rails-2-App.html
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
# See ActionController::RequestForgeryProtection for details
2005 Aug 21
0
Patch for Element.Class - wrong regexp
Hello,
I noticed (due to a recent post by Martin Honnen to clp) that
Element.Class uses wrong regexps for its operations.
E.g., Element.Class.has() will find "classA" in "classA-foobar"
I also changed the interface of .has() to the more general one used in
.has_any()
--- util.js.old 2005-08-21 19:18:40.000000000 +0200
+++ util.js 2005-08-21 19:31:42.000000000 +0200
@@
2005 Nov 09
1
Element.removeClassName(..) - bug or incorrect usage?
Hi,
I have just started using prototype.js and scriptaculous.js in one of
my projects. These libraries are awesome and they let me do so much
more, so easily.
At some point in my web interface, I have an element with multiple
classes, out of which one class needs to be removed.
I am using
Element.removeClassName(element, "classname to remove");
to achieve this.
This call does remove
2008 Apr 03
3
somebody help me to get previous page url in RoR
hi all,
im having a view page called "edit" and im having a back button
in it.im using this edit view page in many place of my application.i
want to go back to the page which calls this "edit" page no matter what
that page is.so somebody please help me to get the previous page url in
ruby on rails.waiting for the response.
regards,
karthik.
--
Posted via
2005 Sep 25
2
Preventing/allowing exceptions to occur in Element.add/remove ClassName
Hello everyone !
Thomas asked me to discuss here the behavior of Element.addClassName, as
relating to ticker #2232 [1]. In HEAD, if the element passed-in to
Element.addClassName does not exist, an exception is thrown, and script
execution stops there.
I believe this is inconsistent with other functions:
Object.extend(Element, {
hasClassName: function(element, className) {
element =
2009 Sep 24
1
R v2.10.0: Doc clarification for cross references and where are we heading?
Hi,
in 'Writing R Extensions" of R v2.10.0, under Section
'Cross-references' (2009-09-07) it says:
1. "The markup \link{foo} (usually in the combination
\code{\link{foo}}) produces a hyperlink to the help for foo. Here foo
is a topic, that is the argument of \alias markup in another Rd file
(possibly in another package)."
2. "You can specify a link to a different
2024 Mar 11
1
R6 "classname" and generator name
I'm writing some code that does a bit of introspection of R6 classes and am
wondering about the "classname" parameter. Its the first parameter to the
"R6Class" class generator generator function, and the few examples I've
looked at on CRAN set it the same as the name of the generator function,
for example, from the docs:
Queue <- R6Class("Queue", .....)
2016 Mar 18
0
Fwd: [Issue]: Regarding client socket getting closed from the server once the lxc container is started
Hi Folks,
Using libvirt python bindings we are creating an lxc container.Here is the
problem that we see sometimes (say 20 % of the time) when we create a new
container.
1.container gets created, and also starts.However the we are not able to
enter the namepace of the container.It throws an error initPid not
available.We see that the using netstat command , socket connection is
closed.
2.To