search for: welcomecontroller

Displaying 14 results from an estimated 14 matches for "welcomecontroller".

2006 Aug 04
1
route error with controllers in a module, should just work
This is ALL I have added to my routes.rb map.connect ''admin'', :controller => ''/admin/welcome'' I have found plenty of examples saying this is correct if you have a WelcomeController in the Admin module, which I do :) But now webrick won''t even start ??? Look at those 4 colons ::::, what is that about ? help ! => Booting WEBrick... generated/routing/recognition.rb:38:in `write_recognition'': compile error (SyntaxError) generated/routing/recognition....
2006 Sep 07
6
Template "specialisation"
...use a specific version in some controllers to have a good DRY approach to my layout. Those controllers should add a little bit more HTML before rendering the results of the actions, in order to avoid copying the entire sitelayout every time. How can I do that? Currently my code is like this: class WelcomeController < ApplicationController #before_filter :show_options layout ''mydefault'' def contact render :partial => "contact" end private def show_options render :partial => &q...
2011 Jun 09
8
Fail to call
...rent_user private def current_user_session return @current_user_session if defined?(@current_user_session) @current_user_session = UserSession.find end def current_user @current_user = current_user_session && current_user_session.user end end #welcome_controller class WelcomeController < ApplicationController def hi @current_user if (@current_user) @welr = ''¡Bienvenido'' + @current_user + '' a nuestra web!'' else @weli = "¡Bienvenido invitado, no dude en registrarse!" end end end #user_sessions_control...
2007 Oct 16
6
RailsStory runner - empty response
I generated a new rails app then installed rspec and rspec_on_rails from trunk. I then created a sample story: require File.dirname(__FILE__) + "/helper" Story "View Home Page", %{ As a user I want to view my home page So that I can get a birds eye view of the system }, :type => RailsStory do Scenario "Publisher with no videos" do When
2006 Jun 27
1
Help me, I stuck ..
...Base has_many :applicants has_many :positions end class Applicant < ActiveRecord::Base belongs_to :sum end class Position < ActiveRecord::Base belongs_to :sum end At first I want to list all positions and then having clicked on it - to receive all applicants with this position. class WelcomeController < ApplicationController def index @positions = Position.find(:all) end end <h1>welcome</h1> <p>Click on a position name to see all of applicants.</p> <ul> <% @positions.each do |position| %> <li><%= link_to "#{position.position_name} "...
2007 Oct 16
5
RailsStory - lessons learned
After trying RailsStory for a few days, I have learned: 1. Rails testing support does not serve up static pages 2. RailsStory masks errors generated by the app under test 3. The masked errors are available in log/test 4. I should read log/test more often See http://pastie.caboo.se/107876 for an example for points 2 and 3 The welcome controller fails when the HTTP_USER_AGENT is missing.
2006 Jan 03
1
RequireResourceHelper for JS and CSS
...on.rb: class ApplicationController < ActionController::Base helper ''require_resource'' end Then in my layout''s HTML "head" section: <%= stylesheet_auto_link_tags %> <%= javascript_auto_include_tags %> Supposing I am writing an action for WelcomeController called ''index.rhtml'', (and that each of the files actually exists), I can now assume that this HTML will be present in the layout: <script src="/javascripts/welcome.js" type="text/javascript"></script> <script src="/javascripts/welcom...
2008 Apr 08
3
Session Expired for Profile Publishing
Ok. I''m not having any success with publishing profile FBML. Example code: class WelcomeController < ApplicationController layout "facebook" ensure_application_is_installed_by_facebook_user def index @user = facebook_session.user ... @user.profile_fbml = render_to_string( :template => ''welcome/profile'' ) end end Results in this error:...
2007 Nov 29
7
Sessions Not Working In Production Mode
I am completely stumped by this problem, and would welcome any suggestions people could provide. My application uses active-record-based sessions. In development mode, the app works fine with sessions, no problems. But in production mode, the process works for a while (a few hours, maybe more), but at a certain point the session mechanism stop working. It looks like the system stops storing new
2006 May 05
0
Login generator ALWAYS says login unsuccessfull
...ings for Ruby on this machine and also don''t have the gem installed for mysql. I''m trying to install it but I''m missing all the things the install is checking for. I''d like to get this working so any guidance would be very much appreciated. Rick Processing WelcomeController#login (for 127.0.0.1 at 2006-05-03 22:56:15) [POST] Session ID: c9ac7164c46237a5ff0ef6556a869d5b Parameters: {"user"=>{"login"=>"admin", "password"=>"radiant"}, "commit"=>"Login", "action"=>"log...
2007 Sep 10
2
expire_page not working
...;, :action => ''staff'' ) $stderr.puts "@@@@@ Staff Page Expired" end end In my administrative controller, I have class Admin::PeopleController < Admin::AdminBaseController cache_sweeper :person_sweeper and finally, in the public controller, I have class WelcomeController < ApplicationController caches_page :staff When I hit the public ''staff'' page, the cache file is created. When changes are made to the underlying data model, the sweeper method is invoked, and I see @@@@@ Expiring staff page @@@@@ Staff Page Expired in the server logs....
2011 Aug 12
16
Rack content-length Rack::Lint::LintErrors errors with unicorn
Has anyone seen anything like this before? I can get it to happen all the time if I issue a HEAD request, but it only happens very intermittently on GET requests. I''m using Ruby 1.9.2p180. Any ideas on where to start debugging? 204.93.223.151, 10.195.114.81 - - [11/Aug/2011 21:03:50] "GET / HTTP/1.0" 200 37902 0.5316 app error: Content-Length header was 37902, but should be
2005 Nov 15
3
Defining a variable in the environment and using it in controllers and views
Hi, I wanted to define a global variable in environment.rb like this: @pagemeta = {:title => ''Default page title'', :description => ''Default page description'', :keywords => ''Default page keywords''} And then, in a controller, override one or several of its values (like @pagemeta[:title] =
2008 Jul 01
8
redirect_to not working
...39;'nateleavitt'' AND `users`.`password` = ''d3b13af68983849e6d7e944bde7d02fffc38bf2a62a9d7f75d025a62a1af67d6'') LIMIT 1 Redirected to http://localhost:3000/welcome Completed in 0.04638 (21 reqs/sec) | DB: 0.00568 (12%) | 302 Found [http://localhost/session] Processing WelcomeController#index (for 127.0.0.1 at 2008-07-01 09:58:03) [GET] Session ID: BAh7CDoMY3NyZl9pZCIlYjA3ZGQwMTVmZGU0YWQwMzZiY2U5MGRkODM2YThl YTc6DHVzZXJfaWRpBiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxh c2g6OkZsYXNoSGFzaHsGOgtub3RpY2UiIVdlbGNvbWUgYmFjayBOYXRoYW4g TGVhdml0dCEGOgpAdXNlZHsGOwhG--2ad40b26ad78c3a7aec22...