search for: home_control

Displaying 16 results from an estimated 16 matches for "home_control".

Did you mean: code_control
2010 Aug 21
4
No route matches?
...ew" even though I have it defined it. I''d appreciate any help on this. I''m using rails 3.0 and the setting for the environment is "development". # routes.rb Site::Application.routes.draw do get "home/index" root :to => "home#index" end # home_controller.rb class HomeController < ApplicationController def index @page_title = "Home" end def view @page_title = "View page" end end and I have two view files in app/views/home: index.html.erb view.html.erb -- You received this message because you are subscrib...
2006 Feb 14
0
Help with Eager Association
...`generate_primary_key_table'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations.rb:849:in `find_with_associations'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:395:in `find'' /app/controllers/home_controller.rb:10:in `index'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in `send'' /app/controllers/home_controller.rb:10:in `index'' ... etc.. the rest traces back to the dispatch.cfgi... I''m about this close to just doin...
2008 Apr 14
2
Problems with nil object
...post id, text and comments_count to store the number of comments-children of each post (as recomanded to do in AWDWR); and the table comments, with comment id, post_id for the post they''re referred to, and text (there are many other fields, but they''re not importat here). I have a home_controller, this is the code: class HomeController < ApplicationController def index @posts = Post.find(:all, :order => "data DESC") end def show_comment @posts = Post.find(:all, :order => "data DESC") @comments = Comment.find(:all, :conditions...
2006 Jun 22
2
MVC architecture
Hi, I want to creat a GUI accessible via the web with ruby to interface some matlab implementation ... so I extended Ruby with C++ and then matlab :) that works perfectly: I have finaly a Ruby class I can call whenever I want to lunch my matlab algorithm ;) the point is now I have to make the GUI in HTML with Rubby on rails and Damn! I don''t get how works the MVC architecture in Ruby
2006 Jun 24
6
Ajax fade effect
I have a list of categories, when I delete one of them, I want that item to fade and then get removed. So I do the following: 1. home_controller: def delete @category = Category.find_by_name(params[:name]) @element_id = @category.name Category.delete_all(["name = ?", @category.name]) end 2. delete.rjs: if @element_id page.visual_effect :fade, @element_id page.delay(5.seconds) do p...
2006 Jun 01
2
How to call database variables from "Public" folder?
If I want to use for example, <% for product in @products %> in "index.html" (for HomePage) of the "public" folder to call the objects in "products" database table, how do I do that please? It seems that I could not directly call it in the file. actually, I want to partial-render a list for products in the homepage. I think there must be a smart way. btw, is
2006 May 15
0
losing validation error messages
Hello all, I am pretty new to Rails and have recently started on a simple project with it.. I have a simple home_controller and home/index.rhtml page that displays a login/registration form. The login/registration actions are handled by users_controller.rb. register action in users_controller always redirects back to :controller => "home", :action => "index".. The whole site uses one l...
2005 Dec 18
0
Caching question
...ns on index (index.html gets created in public) but rails won''t create/cache home.html - which slows the site down. If I copy public\index.html -> public\home.html I get the performance increase but rails will never create home.html on it''s own. What am I missing? Here is my home_controller.rb file. Initially it just had "def index" but I added "def home" while trying various solution. class HomeController < ApplicationController caches_page :index caches_page :home layout "ui" def index @siteoption = Siteoption.GetSiteOptionHash(&q...
2010 Jul 25
0
You can't set a constant with namespace in the initializers?
Help! in my rails controllers, there is a ''Admin'' namespace. (My the structure of the controllers dir is like this : app/controllers: home_controller.rb ... admin/posts_controller.rb admin/pages_controller.rb The ''Admin'' will automatically become a Module constant (I know it from the console: ''puts Admin => Module''); And in my initializers, ther is a init.rb which has codes like this: Object.const_set...
2014 Jun 04
0
Design question: Redirection to a "create" action.
...e called "Dicts", i.e. there is a dicts_controller, and my routes.rb contains a "resources :dicts". - I have a home page (starting page), which will eventually contain some user authentification (not implemente yet), and then allow the user to manage the Dicts objects. I have a home_controller and my routes.rb contains match '/login', to: 'home#login', via: 'get' root 'home#init' and init.html.erb contains the login form. So far it's quite conventional. Now to the perhaps unusual part: - For convenience to the user, the login form contains n...
2006 Nov 20
0
End-of-File Error occured at <except.c>:79 in xraise
...ctions.rb:126:in `save'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1398:in `save_without_validation!'' /usr/local/lib/ruby/gems/1.8/gems/activerecord- 1.14.4/lib/active_record/validations.rb:746:in `save!'' #{RAILS_ROOT}/app/controllers/home_controller.rb:33:in `event_info'' -- Posted via http://www.ruby-forum.com/.
2006 Jun 17
2
RJS templates - newbie
...le categories (name varchar(255) ); rails RJSTest cd RJSTest rake update_javascripts script/generate controller home index add script/generate model category Note: When I did a rake update_javascripts, I did not see any output. I configured database.yml to talk to mysql. Next I wrote controller/home_controller.rb: class HomeController < ApplicationController def index @categories = Category.find( :all ) end def add @category = Category.new if request.post? @category = Category.create( params[:category] ) end end end Then I wrote views/home/index.rhtml: <%= form_remote_tag :url...
2009 Mar 26
1
Error Send Message
...ailer-2.1.0/lib/action_mailer/base.rb:508:in `__send__'' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action_mailer/base.rb:508:in `deliver!'' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action_mailer/base.rb:383:in `method_missing'' /app/controllers/home_controller.rb:38:in `sendmail'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `send'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `perform_action_without_filters'' /usr/lib/ruby/gems/1.8/gems/act...
2005 Dec 17
13
Rookie with ActionMailer
...il. I''m looking at examples in AWR and also on the wiki. I feel that I sort of have things set up right but I''m getting an error I can''t grok: Net::SMTPFatalError in Home#email_list 550 5.7.1 Unable to relay for jpfeifer-fVOoFLC7IWo@public.gmane.org /app/controllers/home_controller.rb:34:in `email_list'' script/server:54 jpfeifer-fVOoFLC7IWo@public.gmane.org is my email and is pulled from my database table I''m set up like this: Controller: def email_list email = Email.find(:first) MailList::deliver_send_email(email) end Model: class MailList < A...
2013 Oct 27
5
run simple method from Helper on button click
Greetings, I''m new to rails and currently having couple problems about how to add javascript functionality into rails. I have a simple method in the helper and i want to run this code on button click. ------------------------------------------------------------------ module PagesHelper def show_message "simple output" end end
2012 May 12
0
Running Ruby on Rails with cPanel/machighway.com not working
...Gem::SourceIndex#each called from /usr/lib/ruby/gems/1.8/gems/ rails-2.3.14/lib/rails/vendor_gem_source_index.rb:124. exists app/controllers/ exists app/helpers/ create app/views/home exists test/functional/ create test/unit/helpers/ create app/controllers/home_controller.rb create test/functional/home_controller_test.rb create app/helpers/home_helper.rb create test/unit/helpers/home_helper_test.rb create app/views/home/index.html.erb Using VI from the terminal (still logged in via ssh) I modify the file app/views/home/index.html.er...