similar to: Calling a method in another controller

Displaying 20 results from an estimated 100 matches similar to: "Calling a method in another controller"

2006 Jan 30
2
Modules, controllers and inheritance
Hi! I was trying to cleanup my app and I runned into quite a problem. My controllers in submodule do not seem to inherit things from base class. I have following setup: app/controllers/ application.rb: class ApplicationController admin/ admin_controller.rb: class Admin::AdminController < ApplicationController include LoginEngine include UserEngine
2008 Jan 13
6
Graceful way to handle execution expired and bad URI errors?
Hello, I have a program that takes blog urls that our customers enter into their profiles. In some cases they enter bad feeds (IE html pages instead of atom or rss), and it throws these two errors: execution expired and bad URI errors in the view. I need to find a graceful way to handle both. Preferably, if I could find a way to throw an error message for the execution expired
2006 Apr 11
12
RJS
I am trying to use RJS as shown in this tutorial : http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates However it does not seem to work. I am not getting any excpetions in the logs. Here is what the logs say : Parameters: {"action"=>"add", "controller"=>"homepage"} Rendering homepage/add The homepage/add is named add.rjs I know
2006 Jun 27
4
RJS Form Values
Hi, I have the following code : <%=link_to_function("? | China", update_page{|page| page[''tags_en''].value = "China" page[''tags_ch''].value = "?" }) %> This updates two text fields with the China and ?. However I want to append the values, not replace them. So I need something like this :
2006 Jun 30
1
Apache Cache
Hi, I have a strange problem. I have implemented fragment caching. I am pulling my delicious links to my site. I print out to the log every time it connects to delicious. >From the logs I see that it is not using the cached fragment. It connects on every page load. This is running under Apache2 (ubuntu). I am using the default .htacess file that came with RoR. However when I run it
2006 Mar 31
7
Recommended search library?
I''m at a point where I''d like to start adding search capability to my app, so I thought I''d ask: Anyone have any recommendations for a good Rails search library/plugin/etc? There seem to be quite a few different ones out there, but I don''t have much context on any of them. What is the difference between using Ferret, or a SearchGenerator, SimpleSearch,
2006 May 11
12
Verifying Good Setup of RoR + PostgreSQL
I''ve been reading the RoR tutorials and wiki help stuff, but I''m stuck. :( I''ve got RoR installed properly and get the "Welcome aboard! You''re riding the rails." I have an "article" controller, "article" model, and both an "article" and "articles" views (one is a remnant, I think, and no longer needed) (the
2006 Apr 03
2
Order By Number of Comments
Hi, I am new to Ruby on Rails, so I apologise if this has been answered elsewhere. I have had a look through the list but I can''t seem to find what I am trying to do. I have implemented the standard blog and comments app from the screencast. However I am trying to extend the functionality. I want to be able to display a list of posts and order them by the total number of comments
2006 Oct 30
16
Seymore - Content Management On Rails
I have just open sourced my Content Management System called Seymore. Rather than having a separate administration section for managing content, content management functions are available throughout the site so users are able to contextually and comfortably manage the content. I am looking for any and all feedback. Please, either checkout the latest source from subversion, grab version 0.1 from
2019 Jun 25
3
Potential missed optimisation with SEH funclets
I’ve been experimenting with SEH handling in LLVM, and it seems like the unwind funclets generated by LLVM are much larger than those generated by Microsoft’s CL compiler. I used the following code as a test: void test() { MyClass x; externalFunction(); } Compiling with CL, the unwind funclet that destroys ‘x’ is just two lines of asm: lea rcx, QWORD PTR x$[rdx] jmp ??1MyClass@@QEAA at XZ
2005 Oct 28
1
Actionless self-referential views , logic in my views, yes, but less LOC. One draw back, it dont work.
<%= render (:partial => "collapsed_blog" , :locals => {:be => be , :hide => "yes"}) %> This above code is in a .rhtml page. Here is the partial it renders: <p class=<%="blog_content" + be.id.to_s%>> <% if hide == "yes" %> <%= be.blogshorttext %> <%= link_to_remote ('' [See Full Text ('' +
2006 Mar 28
0
ajax question about refreshing divs
Ok, I have manny divs in the html, and I have a login form in a inner div, if the user tries to login and the user/password is invalid, only the inner div needs to be refreshed and show the user the error. If the user/password is ok, the main div needs to be refreshed. How could I do this? this is the view in example <div id="MainDiv"> foo <div
2023 Aug 24
4
[PATCH (set 1) 00/20] Rid W=1 warnings from GPU
On Thu, 24 Aug 2023, Jani Nikula wrote: > On Thu, 24 Aug 2023, Lee Jones <lee at kernel.org> wrote: > > This set is part of a larger effort attempting to clean-up W=1 > > kernel builds, which are currently overwhelmingly riddled with > > niggly little warnings. > > The next question is, how do we keep it W=1 clean going forward? My plan was to fix them all, then
2005 Nov 14
0
in_place_editor_field inside a partial collection
(I''ve already posted this to a quite unrelated thread. Sorry for those reading this twice.) Did anybody succeeded in using "in_place_editor_field" inside a partial collection? It''s working perfectly in a regular template, but the id part becomes blank when it''s inside a partial collection. article_controller.rb: class ArticleController <
2006 Jun 27
1
Static pages
I have lot of static pages in my applications (FAQs, Contacts, Privacy etc..) What is the best way to handle (deploy) these pages in my application. I am using Apache with fastcgi. I would like to deliver the static pages from the apache itself. Basically how the deployment is done? The catch is the user should be easily navigate between the static and dynamic contents. thanks thila --
2006 Aug 31
2
How to set RAILS_ENV for different directories (fcgid)
Hello! I want to use the same application in two environments (production and development) on the same server (apache2 with fcgid) in different (aliased) directories. Is there a way to specify RAILS_ENV inside my <Directory> directives? I have the line DefaultInitEnv RAILS_ENV production in my httpd.conf but I want one of the directories to be development. Setting the ENV var directly in
2005 Nov 16
19
Concerns over Rails' handling of tests
Sorry if this comes across as a bunch of disjointed thoughts...I''m just trying to put my thoughts down and I''d like to know what other people''s opinions on the subject are. I''ve been working with Rails for 3 or 4 months now and I''m constantly trying to look at ways of improving my testing techniques, especially when it comes to TDD. I have a few
2006 Jan 19
4
Controller / Model confusion
I have created a product, with two controllers and two models, one for categories and one for articles. In my models directory, I have article.rb and articles.rb and seem to have code that relies on both of these! I am unable to get any validation working because of this (whichever model I put the code in, it doesn''t load it) Should I just rip it all apart and start again? --
2008 Apr 15
4
ActiveRecord::StatementInvalid in BlogController#index
Hello. I''m trying to do the video tutorial "how to build a blog engine in 15 minutes with ruby on rails" from the main rubyonrails website, and I''m getting an error when I try to use scaffold :post after editing my config file for the mysql database. Here is the exact error I''m getting: ActiveRecord::StatementInvalid in BlogController#index
2008 Jan 30
1
undefined method `scaffold'
Hello, I have been busy for a while and now I am back to messing with rails. Last time I tried to use scaffold i worked now I am getting this error. Not really sure since I am using version 1.2.5 still NoMethodError in BlogController#index undefined method `scaffold'' for #<BlogController:0x506eb7c> Session dump flash: !map:ActionController::Flash::FlashHash {} Thanks for any