Displaying 2 results from an estimated 2 matches for "ctrl_name".
Did you mean:
ctl_name
2007 Apr 30
2
Structuring a rails application
I try to structure my rails application with modules, but i have
problems to define the routes. Is'' it possible to use someting like
this: <%= link to ''...'', :module => :module_name, :controller
=> :ctrl_name [...] -%> ?
The controllers i want to access are in app/controllers/module_name. I
thougt i could define something like this: map.connect
'':module/:controller/:action'', but it doesn''t work.
--~--~---------~--~----~------------~-------~--~----~
You received this mess...
2010 Apr 26
2
woriking under webrick but not under passenger
...-----------------------
class ApplicationController < ActionController::Base
before_filter :authorize, :except => :login_page
helper :all # include all helpers, all the time
protect_from_forgery # See ActionController::RequestForgeryProtection
for details
def create_default_variables(ctrl_name)
session[:ctrl_name] = ctrl_name
end
# Scrub sensitive parameters from your log
# filter_parameter_logging :password
private
def authorize
unless User.find_by_id(session[:user_id])
session[:original_uri] = request.request_uri
flash[:notice] = "Please log in"...