similar to: ApplicationController common view

Displaying 20 results from an estimated 40000 matches similar to: "ApplicationController common view"

2006 Apr 21
1
Catch authentication result from a model in a controller
Im still following the authorization recipe from the book, now all works fine but im getting trouble in how handle the model authorization result, if the user and pass are correct, it goes to a welcome screen(admin.rhtml) but if wrong the model prints a message in an ugly exception like page "usr and pass not correct", i want to redirect the user to the login
2006 Apr 14
1
Rendering an ApplicationController''s action
Hi ! I''ve pasted Rails Recipe #31: Authentication code, but I wish to use these methods in several controllers. Then I pasted them in ApplicationController, using before_filter method in all the other needed controllers. The problem is that Rails always tries to render a missing template inside the current controller ( app/views/controllers/admin/article/signin_form.rhtml ) while
2008 Jan 14
0
Controoler/View problem
Hi i''m new with ruby on rails. And i''m trying to build an application with an authentication method, I''m using the Recipe from the book "Rails Recipes". The thing is that i wrote the procedure inside the Login controller class, but when i try to access it I got an exception that say "couldn''t find Login With ID=signin" (signin is the method
2007 May 03
0
no route found to match "/application/signin"
I''m posting this because I ran into a problem and had difficulty tracking down the answer. In fact, the answer was in another ruby-forum post, but the Search feature didn''t locate it via the keywords I was using. Hopefully my Subject line will help more people find this solution. PROBLEM: I upgraded from Rails 1.1.6 to 1.2.3. When I did something that required me to sign in, I
2006 Oct 09
5
Problem setting variables in ApplicationController.
I''m dynamically generating menu options based on the currently logged in user: current_user. My menus are setup on the applicatin.rhtml file. The current_user is defined in the application controller. But, attempting to assign it a value while in the application controller results in an ''undefined method'' error. ApplicationController .... def current_user @cu =
2008 Feb 04
3
Hello World: uninitialized constant ApplicationController
Have the Wrox guide, but still having problems getting my hello world to run (very frustrating! ;-) Installed latest InstantRails package for Windows (XP). Thank you so much for helping!! Dirk After creating the project directories, I created my \app\controllers\greeting_controller.rb file: class GreetingController < ApplicationController def greeting end end Then put in my
2006 Jul 05
1
RuntimeError with Rails Recipe "Authenticating Your Users"
HI, I''ve gotten this Rails Recipe running fine (a bit before I completely understand it) except when the signin is incorrect I return an error(below). All I want is to either have the incorrect signin redirected to "store" rhtml or to a refreshed and empty signin. Any clues??? TIA Chas ######From Browser ##### http://localhost:3000/admin/signin RuntimeError in
2006 Mar 29
0
placing specific views within a subdirectory?
Can anyone show me how to go about placing specific views within a directory? ie: controllers/hello.rb views/hello/english/world.rhtml views/hello/english/people.rhtml views/hello/spanish/mundo.rhtml views/hello/spanish/gente.rhtml instead of the usual: controllers/hello.rb views/hello/world.rhtml views/hello/mundo.rhtml hello.rb currently contains the basic methods: class ChartsController
2006 May 18
3
access to an ApplicationController property from a view
Hi there, How is it possible to get access to an ApplicationController property from a view? Consider this (simplified) situation: class ApplicationController < ActionController::Base def folder_id @folder_id = params[:id] return @folder_id end end class FolderController < ApplicationController def show @folder = Folder.find_by_id(folder_id) end end So far,
2009 May 15
0
[PATCH server] final cleanup for service layer refactoring.
I've pulled out the no-longer-necessary remnants of the old way of handling auth and before_filters as well as fixing a couple bugs that had crept in along the way. Unit test fixes for the refactoring will follow in a subsequent patch. Signed-off-by: Scott Seago <sseago at redhat.com> --- src/app/controllers/application.rb | 46 ----------------
2006 Apr 27
2
problematic admin/views
ok, i have a pretty almost finished (frontend) blog, i have defined an admin zone with authentication to add content, now im getting trouble with the views for the controllers in the admin zone, here you can see my file structure: http://img284.imageshack.us/my.php?image=tmpviews6oq.gif and my admin controllers like this: controllers/admin/admin_controller.rb class Admin::AdminController
2009 Sep 23
0
[PATCH server] consolidated network & routing info ui's
created/edit network information is all specified on one simpler form --- src/app/controllers/network_controller.rb | 27 +++++++++++++++---- src/app/models/bonding.rb | 2 +- src/app/models/network.rb | 2 +- src/app/models/nic.rb | 2 +- src/app/views/network/_form.rhtml | 15
2007 Aug 15
4
nuby: how spec redirect_to at ApplicationController
Good morning rspec people! Still rspec nuby: I must do something wrong obviously. How can I spec about redirect_to at ApplicationController describe ApplicationController do it "method login_required should redirect to home path without login" do pending "I tried to use controller.login_required.should be_redirected and got NoMethodError with nil object
2007 Nov 19
2
Help with controller and view
I have the following models class Recipe < ActiveRecord::Base has_many :ingredient_recipes has_many :ingredients, :through => :ingredient_recipes end class IngredientRecipe < ActiveRecord::Base belongs_to :ingredient belongs_to :recipe end class Ingredient < ActiveRecord::Base has_many :ingredient_recipes has_many :recipes, :through => :ingredient_recipes
2008 Jan 28
0
gettext 1.10: uninitialized constant ApplicationController
When running rake updatepo with gettext 1.10, for several controllers it gives Ignored ''app/controllers/sample_controller.rb''. Solve dependencies first. /Users/sava/code/sht/trunk/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:266:in `load_missing_constant'': uninitialized constant ApplicationController Rails is 1.2.5, frozen in
2006 Dec 01
0
You are being redirected message
Ticket #3082 details a fix to add a body to redirect pages. This seems like an old patch, but only now is it biting me. I have an authentication scheme like this: class ApplicationController < ActionController::Base before_filter :check_authentication, :except => [:signin] def check_authentication return true if session[:user] session[:return_to] = request.request_uri if
2006 Jun 09
0
Controller Modules Messed Me Up
Modules are exactly what I needed to figure out, but once I started my app over again putting my controller under a module folder, I can''t get my basic app going. Basically I have a News app, where we will post PR and other articles of interest. It was working fine with a model/controller combo of news/index for the public and news/admin for the administrators. Keep in mind this
2009 Aug 10
2
A copy of ApplicationController has been removed from the module tree but is still active!
Yes, more dependencies.rb fun! As far as I''m able to ascertain, these errors started appearing after upgrading from Rails 2.3.1 to 2.3.2 and persist in 2.3.3. They''re highly nonderministic and appear rather sporadically, which makes it extremely frustrating. Multiple developers on our team have experienced this problem across varying versions of Ruby/Rails. They''re
2008 Feb 08
0
Challenge! How can I write a test to test the methods in ApplicationController?
Hi all, I''ve been Googling this one for a while now, and haven''t found a satisfactory answer. It has been posted here before by someone else, but it seems to have got forgotten, so here goes - perhaps someone can think up a way around the problem? In ApplicationController, I have the following method: class ApplicationController < ActionController::Base <snip>
2006 Aug 14
2
Undefined Method error for call to ''render_component_as_string''- Why?
I want to put a ''search_box'' text_field in the header of each page. This common header template is implemented in ''views/layouts/application.rhtml''. The search_box is implemented in a controller named ''users''. (so ApplicationController is calling an :action in UserController) When I add this line to my