search for: usercontroller

Displaying 20 results from an estimated 115 matches for "usercontroller".

Did you mean: userscontroller
2012 Apr 02
0
uninitialized constant UserController
Rails 3.1.3 I am trying to create an administrator page. ''User'' table has a field, admin:boolean, then user having ''admin=true'' can only access it, as you can imagine. But accessing http://localhost:3000/admin/user gives an error, uninitialized constant UserController I have ''controllers/admin/admin_application_controller.rb'' class Admin::AdminApplicationController < ApplicationController before_filter :admin_login_required def admin_login_required if @current_user.admin return true end redirect_to :controller =>...
2006 May 05
2
newbie ruby string match question
All, I want to know in the Application.rb controller if I''m on the login screen. When I''m on the page I care about the controller variable is "#<ActiveRbac::UserController:0x408b3d6c>" So I want something like: if controller contains ActiveRbac::UserController What is the right syntax for the above? Thanks Greg -- Greg Freemyer The Norcross Group Forensics for the 21st Century
2006 Jan 11
17
Different Types of Users and User Engine
...in order to derive several different types of users, such as "moderators," "editors," etc ... For example, let''s say that I want to create a moderator. I define a new moderator class and Controller like so: class Moderator < User end class ModeratorController < UserController end My problem with this is that since several functions such as "login," "signup" and others directly call the User class. I cannot simply inherit the ModeratorController from UserController without overriding everyone of these functions and changing every instance of "Us...
2005 Dec 09
7
UserEngine - rake bootstrap aborted
...ngine from the repositories, followed the setup procedures as documented in: vendor/plugins/user_engine/README But I''m getting the following failure: vince@vaio:~/Projects/Booking$ rake bootstrap (in /home/vince/Projects/Booking) rake aborted! undefined method `edit'' for class `UserController'' I''ve commented out the following: # We need to wrap around the old edit # alias :old_edit :edit # def edit # @all_roles = Role.find_all.select { |r| r.name != # UserEngine.config(:guest_role_name) } # old_edit # end (vendor/plugins/user_engine/app/controllers/user...
2005 Sep 25
2
Problem issue with belongs_tohas_one and error_message_on
...m keeping main fields like id,email,password and in profile there are the rest of fields. Table users: id,email,password Table profiles: id,user_id,publicname, and more ... My models are: - user.rb has_one :profile - profile.rb belongs_to :user Briefly User controller looks like . class UserController < ApplicationController model :user, :profile def register @user = User.new(params[:user]) if request.post? and @user.save end end end With this it doesn''t save values in table specialists. In register.rhtml I have <%= error_message_on("user", "em...
2007 Nov 28
6
Broken edge
Hi all, Not sure if I''m the only one with this problem... We''re on edge for both rails and rspec, and i just did an update... Some apparently innocuous rails stuff was updated, and then half my specs broke due to an error in rspec_on_rails: ArgumentError in ''UserController without logged in user should show the index page'' wrong number of arguments (2 for 1) ..../vendor/plugins/rspec_on_rails/lib/spec/rails/example/behaviour/ controller_example_group.rb:188:in `render'' I tried backtracking to an earlier version of rails with no luck. Can anyone...
2006 Jan 07
3
user engine question
I''ve created an array of hashes in UserController#initialize to describe a menu: @menu_array = [ {:menu => ''home'', :controller => ''home'', :action => ''send_home''}, {:menu => ''user list'', :action => ''list''}, {:menu => '...
2006 Aug 16
6
Create several models at once and validating
...ns which work fine, but team model also have a validation for a uniqueness name that doesn''t fire up when she gives an existent team''s name. This is the flow it follows: /user/new -> it shows a form to fill user''s data and a team''s name -> Create -> UserController def create @user = User.create(params) if request.post? and @user.save ...... end end User validates_uniqueness_of :username <--- THIS WORKS FINE def self.create user = User.new(params[:user]) team = Team.new(params[:team]) user.team = team user end T...
2006 Apr 24
3
quick q on script/generate scaffold
I want a scaffold to manager both products and users. To get the products scaffold I used script/generate scaffold Product Admin if I use, script/generate scaffold User Admin will it overwrite my product admin controller? Would I be better off doing script/generate scaffold User User_Admin or something? -- Posted via http://www.ruby-forum.com/.
2008 Mar 10
2
response.body == filename?
I''m using RSpec. describe UserController do it "should require ..." do post :login, {:name => ''root''} puts response.body.to_yaml end end ....--- user/login ????? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups &quo...
2012 Jun 11
0
Using AuthLogic
...n class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.string :username t.string :email t.string :crypted_password t.string :password_salt t.string :persistence_token t.timestamps end end end user controller class UserController < ApplicationController def index end end database.yml development: adapter: mysql2 encoding: utf8 database: login_development user: root password: pool: 5 timeout: 5000 The error is that: StandardError in UserController#index You must establish a database connection befor...
2006 Jun 14
3
where to define a struct
...app: UserInfo = Struct.new( "UserInfo", :first_name, :last_name, :email, :domain_name ) I placed this in the environment.rb, thinking that it should be initialized only once. But when I try to access it from within my controller, I get: undefined method `UserInfo'' for #<UserController:0x243ad5c>. so my questions are: 1) is environment.rb the correct place to define a struct? If not, what''s the alternative. Also, what''s the best place to define classes that are neither controllers nor models? 2) if struct definition in environment.rb is the proper place t...
2013 May 09
7
why i am getting this error
hi!! i am a newbie in ROR, I am getting this error i understand what the error says but don''y know why i am getting this error. ActiveRecord::StatementInvalid in UserController#new Mysql::Error: Table ''user.users'' doesn''t exist: SHOW FULL FIELDS FROM `users` def new @user = User.new end def edit my user controller file contains :- class UserController < ApplicationController def index end def show end def new...
2007 Jul 11
10
read params
hi. I am a rails newbie. I have am Model user with name and email. How can I acces and modify the param email before user.save? <% form_for :user do |f| -%> <p><label for="name">Username:</label><br/> <%= f.text_field :name %></p> <p><label for="email">Email</label><br/> <%= f.text_field :email
2007 Feb 01
3
should_redirect_to in rspec-0.8.0 / rspec_on_rails 1453
...''http://test.host/user'' end the puts statements output the following: redirecting to http://test.host/user this response was true Any idea why this line: controller.should_redirect_to ''http://test.host/user'' would fail with the message: ''Given a UserController edit a post with no user id should add a record'' FAILED controller expected call to redirect_to "http://test.host/user" but it was never received
2016 Mar 31
2
Demote a working DC fails with uncaught exception
Thanks Rowland. Have submitted a bug report (No 11818). spindles7 On Thu, 31 Mar 2016 09:38:02 +0100, Rowland penny <rpenny at samba.org> wrote: >On 30/03/16 23:26, spindles7 wrote: >> Hi all, >> I am consistently getting the error: >> >> root at dc2:~# samba-tool domain demote -Uadministrator >> Using dc1.microlynx.com as partner server for the demotion
2015 Mar 16
2
Re: still possible to use traditional bridge network setup ?
Laine wrote: > -----Original Message----- > From: sendmail [mailto:justsendmailnothingelse@gmail.com] On Behalf > Of Laine Stump > Sent: Monday, March 16, 2015 4:12 PM > To: libvirt-users@redhat.com > Cc: Lentes, Bernd > Subject: Re: [libvirt-users] still possible to use traditional bridge network > setup ? > > On 03/16/2015 10:08 AM, Lentes, Bernd wrote: > >
2008 Apr 30
4
what is .....undefined method `authenticate'
...name="user[password]" size="15" type="password" /></p><br clear="all" /> <%= submit_tag "Login"%> <% end %> </div> ------------------------------------------------------------------------ ERROR IS NoMethodError in UserController#login_submit undefined method `authenticate'' for #<Class:0x36f6cbc> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1532:in `method_missing'' app/controllers/user_controller.rb:34:in `login_submit'' -- Posted via http://www.ruby-forum.co...
2016 Mar 30
2
Demote a working DC fails with uncaught exception
Hi all, I am consistently getting the error: root at dc2:~# samba-tool domain demote -Uadministrator Using dc1.microlynx.com as partner server for the demotion Password for [MICROLYNX\administrator]: Deactivating inbound replication Asking partner server dc1.microlynx.com to synchronize from us Changing userControl and container ERROR(<type 'exceptions.TypeError'>): uncaught
2011 Apr 14
1
a little problem with extJS & log in form
have user_cotnroller class UserController < ApplicationController def authenticate if request.post? #User.new(params[:userform]) will create a new object of User, retrieve values from the form and store it variable @user. @user = User.new(params[:userform]) #@user = User.find_by_id(params[:id]) #f...