Displaying 20 results from an estimated 100 matches similar to: "RJS template problem!"
2006 Jan 13
0
Layout not rendered when render_component used
Hi
I''ve got a login action that handles authenticating users, setting
cookies and, via its view, displaying an HTML snippet containing a form
with username and password fields. It''s called from the main
application.rhtml layout so I don''t need to have a seperate page (away
from the main site) with a login form.
My user model is more-or-less the same as in the Agile RoR
2006 Apr 06
1
Bug? In scriptaculous -- double text drawn one pixel off
Hello, I''m working with scriptaculous, and i''ve narrowed down a bug i''m
having to the following code:
http://rate.urbanpug.com
I''m using the latest release (as of sending this mail) of scriptaculous.
I''ve actually seen this bug before, and random tweaking fixed it.
Unfortunately, i can''t figure it out this time. I''ve reduced the bug
2009 Apr 29
7
problem with nil.user
Hi all, I''ve put new code into my app so that an administrator will have
extra privileges (administer users, edit pages). The error is:
''Couldn''t find User without an ID''
So the app is looking for a logged in user when the homepage is
accessed.
Heres my code:
site/index view:
<% if is_logged_in? and logged_in_user.has_role?(''Moderator'')
2006 Jul 27
2
setting initial text field values in a form
Hi,
I am trying to create a basic form in which I want one of the fields
initialized before displaying it.
My code (in a view) is as follows:
<%
if ( session[:user_id] != nil )
then
logged_in_user = User.find(session[:user_id])
end
%>
<% form_for :suggestion do |form| %>
<label for="suggestion_title">Topic:</label><br/>
<%=
2009 Jun 05
6
rails 2.3.2
Hi all,
I am using rails v.2.3.2 and if I put following line to my
ApplicationController:
include LoginSystem
and I moved my login_system.rb to lib folder:
module LoginSystem
protected
def is_logged_in?
@logged_in_user = User.find(session[:user]) if session[:user]
end
def logged_in_user
return @logged_in_user if is_logged_in?
end
def logged_in_user=(user)
if
2010 Apr 27
1
Translation Failure
Hi,
i''m getting a translation failure:
translation data {:username=>"Benutzername"} can not be used
with :count => 1
What does this means?
In my de.yml File i wrote in the activerecord part:
models:
user:
username: ''Benutzername''
Thanks
--
You received this message because you are subscribed to the Google Groups "Ruby
2008 Jan 21
7
undefined method error
Hello everyone,
I am following the Practical Rails: Social Networking
sites book. In chapter 7 photo gallery I am getting a
NoMethodError in Pages#show
Showing layouts/_menu.rhtml where line #12 raised:
undefined method `new_entry_path'' for #<ActionView::Base:0x52fa56c>
Extracted source (around line #12):
9: <% if is_logged_in? %>
10:
2009 Feb 25
3
Secure but elegant destruction method
Hi,-
I am looking for a clean and secure way for an ActiveRecord instance to
delete itself. Say I have a User model in my app. Then the destructive
action would be /users/user_id/destroy. If this action is not secured by
a filter like:
(*) before_filter :check_administrator_role, :only => :destroy
then any user could potentially log in and start issuing:
/users/1/destroy
/users/2/destroy
.
2006 Jun 06
5
Functional tests and protected actions
Hello!
I have certain methods in my Application Controller, that I need to access.
Namely ApplicationController#logged_in_user
The problem is, that when I try to access it, I get:
NoMethodError: protected method `logged_in_user'' called for
#<AdminController>
Any ideas how I can circumvent that?
Or are functional tests really not suited for any kind of logins and session
work?
2006 Mar 02
8
User Authentication
I''m trying to create a simple authentication system but am failing
miserably. I''m (sort of) following the "Logging In" chapter of the Agile
book. Ideally, any access to http://example.com/publish (and any of its
subdirectories) should redirect to http:/example.com/publish/login when
there is no valid session user_id.
Code so far:
2016 Apr 08
0
Samba as AD-Controller: unable to update policies and call start scripts
Anmeldung fehlgeschlagen: unbekannter Benutzername oder falsches Kennwort.
And you did login in the domain with a domain user?
Looks like it you did not.
So try this from the pc which give the problem.
net use x: \\cch.intra\sysvol /user:CCH\username
Did it work?
Ow and one i forgot..
Did you check the time on the pc and server, these must be in sync.
Greetz,
Louis
>
2006 Apr 07
2
Access instance variables from model?
Can I make my model methods aware of the context (preferably instance
variables) where they are run, without having to pass them arguments?
The app in question should be time zone aware, so something like
user.events[0].starts_in should check against @logged_in_user.now rather
than Time.now.
I could send the user as an argument
(user.events[0].starts_in(:timezoned => @logged_in_user)),
2009 Feb 21
1
undefined method user_id
Basically, Im trying to add comments to photos that other users have
uploaded. And Ive encountered an error:
NoMethodError in CommentsController#create
undefined method `user_id='' for #<Comment:0x4768cd0>
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1857:in
`method_missing''
2007 Aug 31
2
Give focus to an input field of a form
Hi,
I am new to rails and I have setup Typo on my site. One little
thing bugs me, the login page doesn''t give focus to the "user_login"
field. I was wondering what do I need to do to make rails help with
this? I have seen some simple inline javascript to set the focus,
sort of like:
document.<form_name>.user_login.focus()
However the rails view doesn''t
2007 Jul 20
3
Mozzila Logout back button issue
Hello,
I have recently created an application in Rails which makes use of a
login and logout system. I have a user controller and model as well as a
login controller. My login controller performs my logout and login
functions. The user is a scaffold of my database table and is auto
generated from rails.
def process_login
#Creates the user with the form variables i have not included the
2003 Aug 27
1
samba und netzlaufwerke unter winxp
Hallo,
Ich habe ebendfalls das Problem, dass ich mich extra anmelden muss bei
meinem Linux-Server. Hast Du da eine L?sung gefunden.
From: "Marcel Stein" <marcel-stein@arcor.de>
Subject: samba und netzlaufwerke unter winxp
Date: Thu, 26 Jun 2003 20:04:56 +0200
Message-ID: <000001c33c0d$76d703f0$0201a8c0@winxp>
Ich habe einen samba zu laufen und greife vom client winxp
2006 Dec 07
6
form_tag not producing output
I''ve got two servers, both with Rails 1.1.6 on them. I''m trying to
remove some of the newly-deprecated stuff in my app, and I''ve run into
a problem. My login page used to look like this:
<div title="Account login" id="loginform" class="form">
<h1>Please Sign In</h1>
<%= start_form_tag :action =>
2006 Mar 16
4
Handling/Catching Exceptions
Hello!
I was wondering, sometimes I raise an exception in my Rails apps, e.g.:
raise SecurityError unless @post.user == logged_in_user
Now: is there any way to catch that SecurityError exception somewhere
and render a custom template? E.g., I want to render
''app/views/content/security_error.rhtml''
Does anyone know how to do this?
Thanks a bunch,
Rob
2006 Apr 05
0
cookies not deleting?????
I was running into a problem where i was setting two different cookies for "
www.myapp.com" and "myapp.com". To fix this, when i set the cookie i
specified the domain to be ".myapp.com". However now when i try to delete
the cookie cookies.delete :myapp_cookie, it wont delete.
Why is that?
Here is my code:
when logging in -
...
cookies[:myapp_cookie] = {:value
2019 Jul 26
4
GPO issues - getting SYSVOL cleaned up again
One more i found is :
http://www.edugeek.net/forums/windows-7/145171-event-id-1053-group-policy.html
But i dont expect that to be your problem, just do checkit.
And review these steps
https://www.dell.com/support/article/nl/nl/nldhs1/sln163816/troubleshooting-group-policy-processing-errors-in-an-active-directory-domain?lang=en
I can type it all, but then you get more typo's ;-)
Above