search for: articlecontroller

Displaying 7 results from an estimated 7 matches for "articlecontroller".

Did you mean: articlescontroller
2006 May 11
12
Verifying Good Setup of RoR + PostgreSQL
...and others). Does that sound workable so far? I also have a PostgreSQL database set up called MMC, with one table called articles, with columns of id, title, blurb, author. How do I test this configuration? http://MMC works fine. http://MMC/article gives me the error message: Errno::EINVAL in ArticleController#index Invalid argument
2006 Apr 04
1
Calling a method in another controller
...omepage. I will also have some specific homepage modules being displayed on the page. I am trying to do something like this : require ''content'' class HomepageController < ApplicationController def list @blog_contents = BlogController.list @article_most_discussed = ArticleController.list etc... end end But it does not seem to work. How do I reference methods in other controllers ? Is it done ? I can replicate the code in this controller, but that will be messy. Thanks in advance. Hamza -- Posted via http://www.ruby-forum.com/.
2005 Nov 14
0
in_place_editor_field inside a partial collection
...ead. 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 < ApplicationController in_place_edit_for :comment, :body ... end _comment.rhtml: <li id="comment-<%= comment.id %>"> <%= in_place_editor_field :comment, :body %> </li> show.rhtml: .... <ol id="comments"> <% unless @article.comments == nil...
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? --
2005 Nov 16
19
Concerns over Rails' handling of tests
...t Rails assumes you want to test an entire controller in a testcase. I''ve found that this leads to tests that are far to big. I believe better breakdown would be to have a test case for each action, or even a testcase for each action in different contexts. So, as an example, say you had an ArticleController with view, post and create actions. The post action simply displays the form which submits to the create action. Now, instead of having one large ArticleControllerTest, it would make far more sense to break it down into ArticleViewTest, ArticlePostTest, FailedArticleCreate test and SuccessfulArtic...
2006 May 18
6
Newbie:problem when using validates*
Hi, I have performed the cookbook tutorial. Before tailoring the views and controllers, when I put in the model recipe.rb: validates_uniqueness_of :title validates_length_of :title, :within => 1...20 And I tried to introduce some new recipe without the above conditions I got the message: --------------------------------------------------- New recipe 1 error prohibited this category from
2007 Aug 02
2
STI functionality, but then with multiple tables
Hello, I''m creating my own Tumblr [tumblr.com] like rails app. It''s like a blog, but in this case a blog post could be of a certain type, i.e. a regular post, a video, a link, a photo, a song(info). Well now, it''s clear that they share a lot of similar functionality: title, created_at/updated_at, commentable, probably has an author_id, etc.. But besides that they are