Displaying 20 results from an estimated 35 matches for "account_control".
2007 Mar 31
0
routing problem with controllers in other dirs
Hi all
I have a problem with mapping url to controller which is deeper in
controller directory (not root directory). I wanted to move
acts_as_authenticated account_controller deeper to directory (let''s
call it Foo) and route it as /Foo/Account, but i always seem to get
exception that no route matched my request
file structure:
/app
+- /controllers
+- /Foo
+- /account_controller.rb
-- routes.rb --
map.connect ''Foo'', :contr...
2005 Sep 02
7
Form to update two tables
...all
worked fine so far. But I want to add a bit more functionality so that
when a user signs up in addition to chosing a login name and password
they type in a company name which is added to a seperate table called
COMPANIES. The id for this record should then be added to the user
record (see # in ACCOUNT_CONTROLLER.RB).
Those in the know will be unsurprised to find out that this isn''t
working! I''ve found lots of examples on the web for multiple table
forms with select fields but not with just text fields, the difference
being that with selects, the id to be copied already exists before...
2006 Jun 04
4
directory structure on typo
i was looking through the typo code and see that all of the
administrative controllers and views are placed in another subfolder. i
tried just moving the files just for kicks and it didn''t work (didin''t
really expect it to, but it was worth a shot.)
so how do you set something up like that? i tried looking in the
routes.rb file, but i''im not sure what''s in
2006 Jul 04
1
Has_many :through with checkboxes?
...should clear out a user''s subscriptions on submit
## (to account for unchecked boxes and to start from scratch for the
next step) and then
## I should add a subscription for each checked box
## this doesn''t work, but it''s what I''m hacking on now--HELP! :-)
# account_controller.rb
@user = User.find(params[:id])
subscriptions = Subscription.find(:all, :conditions => "user_id =
@user")
subscriptions.each do |subscription|
subscription.destroy
end
categories = params[:cats]
categories.each {|cat|
subscription = Subscription.new(:cat_id=>cat, :use...
2007 Jun 11
3
ActiveRecord::StatementInvalid error
...ib/
active_record/base.rb:997:in `find_every''
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/
active_record/base.rb:991:in `find_initial''
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/
active_record/base.rb:417:in `find''
/app/controllers/account_controller.rb:674:in `ap_status_review''
/app/controllers/account_controller.rb:655:in `ap_status_review''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/base.rb:1095:in `perform_action_without_filters''
/usr/local/lib/ruby/gems/1.8/gems/actio...
2006 Mar 13
0
Problems with association named :task
...ssociations/association_proxy.rb:32:in
`reload''
./script/../config/../vendor/rails/activerecord/lib/active_record/associations.rb:661:in
`task''
./script/../config/../vendor/rails/activerecord/lib/active_record/associations.rb:654:in
`task''
#{RAILS_ROOT}/app/controllers/account_controller.rb:96:in
`redirect_to_last_viewed_task''
#{RAILS_ROOT}/app/controllers/account_controller.rb:80:in `login''
and simultaneously in the log I get:
WARNING: Deprecated reference to top-level constant ''Task''found at:
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.0/l...
2008 Apr 20
2
open_id_authentication - authenticate_with_open_id
...uthentication.rb:
146:in `open_id_redirect_url''
vendor/plugins/open_id_authentication/lib/open_id_authentication.rb:
97:in `begin_open_id_authentication''
vendor/plugins/open_id_authentication/lib/open_id_authentication.rb:
86:in `authenticate_with_open_id''
app/controllers/account_controller.rb:33:in `open_id_authentication''
app/controllers/account_controller.rb:12:in `create''
It seems to be failing here, but I have no idea why...
def requested_url
"#{request.protocol + request.host_with_port +
request.relative_url_root + request.path}"
end
I'...
2006 Jan 13
2
Change Password with acts_as_authenticated
I want to have a form to change a users password. I can''t figure out
what the method in the controller should look like. I tried @user.save
and @user.update_attributes, but can''t get it to work.
My Form:
##############################
<%= start_form_tag :action => "update_password", :id => @user.id %>
<%= password_field ("user",
2006 Apr 12
3
acts_as_authenticated trouble
...lude AuthenticatedSystem
in my application files.
#the problem
The controllers, views, and models all work fine. The user is directed
to ''/signup'' on loading, and upon signing up, everything inserts into
the database correctly, but when I log in, no session is retained.
In my account_controller file, I changed
redirect_to(:action => ''signup'') unless logged_in? or Account.count > 0
to
redirect_to(:action => ''signup'') unless logged_in?
and my application is in limbo.
I haven''t even attempted to get the mailer running yet, and I fig...
2006 Mar 03
2
Through relationship
...ecord/lib/active_record/
associations.rb:695:in `new''
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/
associations.rb:695:in `products''
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/
associations.rb:690:in `products''
#{RAILS_ROOT}/app/controllers/account_controller.rb:65:in `products''
I updated my edge rails (doing it manual for many reasons). I am on
changeset: 3747 as far as I can tell however when i followed the
instructions on the wiki I cound not find a bin directory as the last
few steps mention in regards to replacing some files wit...
2006 May 25
1
AppMailer and McCray''s theme generator
...er/base.rb:267:in
`initialize''
D:/MATech/Prog/INSTAN~1/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`new''
D:/MATech/Prog/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.0/lib/action_mailer/base.rb:227:in
`method_missing''
#{RAILS_ROOT}/app/controllers/account_controller.rb:14:in `login''
Source:
class AccountController < ApplicationController
model :user
layout ''login''
def index
redirect_to ''/account/login''
end
def login
case @request.method
when :post
if @session['&...
2005 Dec 23
3
auth_generator and GD woes
..._ruby/1.8/rubygems/custom_require.rb:21:in `require__''
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require''
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/\
dependencies.rb:214:in `require''
./script/../config/../app/controllers/account_controller.rb:76:in `info''
./script/../config/../app/controllers/application.rb:12:in `process''
./script/../config/../app/controllers/application.rb:11:in `process''
This error occured while loading the following files:
GD
I am running Mac OS 10.4.3 and have insalled gd and gd...
2007 Jan 09
1
assert_redirected_to not working as expected
I''ve installed the "acts_as_authenticated" plugin and made some
modifications to the controller (app/controllers/account_controller.rb)
"signup" module as follows:
===
def signup
@page_title = ''Create Account''
@user = User.new(@params[:user])
if request.post?
if @user.save
session[:user] = User.authenticate(@user.login, @user.password)
redirect_to(:controller =...
2006 Mar 08
6
GD error...
...quire.rb:21:in
`require__''
D:/work/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require''
D:/work/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require''
#{RAILS_ROOT}/app/controllers/account_controller.rb:76:in `info''
#{RAILS_ROOT}/app/controllers/application.rb:14:in `process''
#{RAILS_ROOT}/app/controllers/application.rb:13:in `process''
-e:3|
|D:/work/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require__''
D:/work/InstantRail...
2006 Sep 06
3
url_for , controller routing error
I have an ''account_controller.rb'' in an ''admin'' module
I list the accounts with : http://0.0.0.0:3000/admin/accounts/list,
and get my table
trying to sort it, I use the follwoing sort_link_helper :
def sort_link_helper(text, param)
key = param
key += "_reverse" if @p...
2006 Mar 15
3
[login_generator] implementing login limits
...es to log in with ''admin'', they
are denied.
2. Have an ''auto-logout'' feature where if there is no
activity after say, 15mins, the sesion expires and a new
login is required to get back in.
For [1], I''ve tried hacking the login method in
app/controllers/account_controller.rb by adding:
if !<at>session[:user].nil?
render :text=>"already logged in!"
else
[...rest of stock login code...]
Since there''s only one available username, I''m just checking
to see if <at>session is not empty; if it is, then someone is
log...
2006 Jan 05
3
has_one :dependent => true question
Hello,
I have two classes that are self explanatory and are listed below.
class User < ActiveRecord::Base
belongs_to :account
end
class Account < ActiveRecord::Base
has_one :account_owner, { :dependent => true, :class_name => "User",
:conditions => "is_account_owner = 1" }
has_many :users
end
In the signup controller when an account is created one user
2006 Jan 05
5
Lost connection to Mysql
...rom_column_definition''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1185:in
`initialize_without_callbacks''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/callbacks.rb:236:in
`initialize''
#{RAILS_ROOT}/app/controllers/account_controller.rb:20:in `new''
#{RAILS_ROOT}/app/controllers/account_controller.rb:20:in `signup''
I tried to update the mysql gem by typing gem install mysql, and when I
do, I get the following errors as well:
C:\>gem install mysql
C:\>"c:\ruby\bin\ruby.exe" "c:\ruby\b...
2005 Mar 23
1
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
...#39;
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.9.0/lib/active_record/base.rb:356:in
`find_all''
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.9.0/lib/active_record/base.rb:378:in
`find_first''
/app/models/user.rb:7:in `authenticate''
app/controllers/account_controller.rb:12:in `login''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.6.0/lib/action_controller/base.rb:691:in
`send''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.6.0/lib/action_controller/base.rb:691:in
`perform_action_without_filters''
/usr/local/lib/ruby/gems...
2006 Apr 10
0
TaskThis undefined method `remembrall_expires'' for #<User:0x
...rk Trace | Full Trace
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.1/lib/active_record/base.rb:1792:in
`method_missing''
#{RAILS_ROOT}/lib/auto_login.rb:39:in `active_remembrall?''
#{RAILS_ROOT}/lib/auto_login.rb:47:in `create_remembrall''
#{RAILS_ROOT}/app/controllers/account_controller.rb:17:in `login''
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.1/lib/active_record/base.rb:1792:in
`method_missing''
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in
`send''
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/a...