search for: account_url

Displaying 10 results from an estimated 10 matches for "account_url".

Did you mean: account_pol
2007 May 03
2
Multiple Update Actions that are Relatively the same
Hi there, I have 2 actions that are rather identical: # Put /account/you/update_password def update_password @user = current :user respond_to do |format| if @user.update_attributes(params[:user]) format.html {redirect_to account_url} else format.html {render :action => "edit_password"} end end end # PUT /account/you # Update the user object. def update @user = current :user respond_to do |format| if @user.update_attributes(params[:user]) format.html {redirect_...
2008 Dec 16
20
step definitons to check login
..."You must sign in to access this page" redirect_to new_user_session_url return false end end def require_no_user if current_user store_location flash[:notice] = "You must be logged out to access this page" redirect_to account_url return false end As these are private methods they are not directly accessible from the step definitions and I am at a loss as to how to proceed. I could augment the application controller with a public user_authenticated method: def user_authenticated return true if current...
2006 Feb 18
3
scoped databases need explanation...
Could someone explain this http://blog.leetsoft.com/articles/2005/10/31/scoped-databases in a way that can be understood with an example if possible. Tobi Lutke has started to explain but it does not make any sense. "Since rails 0.13.1 we support calling class methods over associations." what?? give an example. also "The Shop object is figured out at the beginning of each
2006 Jan 25
6
Displaying based on hostname/subdomain
Ive tried multiple ideas to get this to work, but keep hitting a dead end. Has anyone done this before? I want joe.domain.com to display www.domain.com/profile/joe Im using lighttpd. Routes dont have access to the URL string and therefore I cant code in a conditional. lighttpd rewrite seems to really screw it all up. Is there a feasible solution? Thank you, Joe Noon
2010 Oct 21
4
Authlogic + Rails3 - undefined method `Login' for nil:NilClass
...ire_no_user, :only => [:new, :create] before_filter :require_user, :only => [:show, :edit, :update] def new @user = User.new end def create @user = User.new(params[:user]) if @user.save flash[:notice] = "Account registered!" redirect_back_or_default account_url else render :action => :new end end def show @user = @current_user end def edit @user = @current_user end def update @user = @current_user # makes our views "cleaner" and more consistent if @user.update_attributes(params[:user]) flas...
2009 Jun 15
1
NoMethodError: undefined method `password_reset_instructions' for UserNotifier:Class
.../Library/Ruby/Gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/ base.rb:400:in `method_missing'' *** app/models/user_notifier.rb class UserNotifier < ActionMailer::Base def signup_notification(user) setup user subject ''Your new account'' body :url => account_url end def password_reset_instructions(user) setup user subject "Password Reset Instructions" body :edit_password_reset_url => edit_password_reset_url (user.perishable_token, :host => user.account.host) end protected def setup(user) from "noreply@#{ENV[&...
2009 Sep 21
0
Polymorphic form
...r.rb def create @user = User.new(params[:user]) @person = @user.build_person(params[:user][:person]) @person.contacts_attributes = params[:person][:contacts] if @user.save flash[:notice] = ''User was successfully registered.'' redirect_back_or_default account_url else render :action => :new end end Note also that when I view source on the new user page, the type value is apparently set appropriately. Thanks so much. John
2009 Jan 16
16
Testing arbitrary post action parameters
I am working on our (newly renamed) authentication feature. The current scenario is: Scenario: Non-administrators should not set administrator ability Given I have no users And I add a user named "admin" as an administrator And I add a user named "myuser" as not an administrator When the user named "myuser" authenticates And the user
2006 Dec 08
2
UJS plugin incompatible with RSpec?
...e user info to edit'' undefined method `set_default_external!'' for #<#<Class:0x362f964>:0x362ed98> On line #3 of app/views/accounts/edit.rhtml 1: <div id="primary_content"> 2: <h1>Update user information</h1> 3: <%= form_tag account_url(@user), :method => :put %> 4: <%= render :partial => ''user'' %> /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/expectations/sugar.rb:13:in `call'' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/expectations/sugar.rb:13:in `_metho...
2009 Dec 25
18
rescue_from ActionController::RoutingError II
...t;You must be logged in to access this page" redirect_to new_user_session_url return false end end def require_no_user if current_user store_location flash[:notice] = "You must be logged out to access this page" redirect_to account_url return false end end def store_location session[:return_to] = request.request_uri end def redirect_back_or_default(default) redirect_to(session[:return_to] || default) session[:return_to] = nil end rescue_from ActionController::RoutingError d...