Displaying 10 results from an estimated 10 matches for "news_items".
Did you mean:
new_items
2006 Apr 13
0
Globalize not with Rails 1.1.2
Does anybody have the latest Globalize (r184) working with Rails 1.1.2?
I can''t seem to get a very simple example to work:
-----
ruby test/unit/news_item_test.rb
Loaded suite test/unit/news_item_test
Started
F.
Finished in 0.10109 seconds.
1) Failure:
test_add_content_translations(NewsItemTest)
[test/unit/news_item_test.rb:49]:
<"US Title"> expected but was
2006 Jan 08
9
URL/Site structure
...to develop the admin side of my site
(admin_controller)
I have three sections that I want to have the administrator edit, and I
want to call these from the admin controller that has a layout with
navigation to these three sections.
When using the scaffold generator, it obviously generates the news_items
controller, and puts in the associated methods and makes the views.
What I suppose I am wanting is to have all this functionality called
from the admin controller all utilizing the admin view
class AdminController < ApplicationController
CRUD functions for news_items
CRUD functions for...
2006 Aug 17
2
What helper makes "News Item" out of "news_item"?
Hi all
Look at the title, I guess you know what I mean... What helper makes the
attribute names of tables human readable?
news_item >> News Item
name >> Name
etc.
Thanks for info :-)
Joshua
--
Posted via http://www.ruby-forum.com/.
2006 Aug 16
1
Creating a comments system for multiple types of content
Hi all
My site has news entries, it has a party calendar and it has a blog.
Now I''d like to create a commenting system that in fact is quite simple,
but I wanna use it for all these 3 types of content.
My question: how can I do that? I maybe could add an association to all
three types in the comment model:
class Comment < ActiveRecord::Base
belongs_to :news_item
belongs_to
2006 Aug 16
4
Overwrite form helper methods and call old ones in new ones?
Hi all
All my forms should look the same, so I think always putting the right
div etc. tags around them is a violation of the DRY principle.
Until now my forms look like that:
<div class="text_field">
<label for="news_item_subject">Subject:</label> <%= text_field
"news_item", "subject" %>
</div>
Now I want the default
2006 Aug 17
1
Disable rendering of layout using a GET parameter?
Hi all
Is there some sort of a built-in possiblity to disable the rendering of
the layout using a GET parameter?
Something like
:url_for :controller => :news, :action => :show, :id => news_item,
:layout => false
This should construct something like that:
/news/show/123&layout=false
And automatically the layout wouldn''t be rendered. Is this already
built-in, or
2006 Jun 09
0
Controller Modules Messed Me Up
...thing set up fine
with the generator and scaffold for adding news in the admin area.
However now I can''t get the public area to show the list of news. Here
is what I did:
/app/controllers/news_controller.rb
class NewsController < ApplicationController
def Index
@news = News.news_items
end
end
/app/models/news.rb
class News < ActiveRecord::Base
validates_presence_of :date_added, :date_live, :news_date, :added_by,
:headline, :summary, :article
def self.news_items
find( :all,
:conditions => "news_date <= now()",
:order...
2006 Jun 16
4
Prototype $$() on arbitary DOM element ?
I am bit confused with this function. Should I be able to pass in a DOM
element e.g. someAjaxRequest.responseXML and interrogate it ?
Seems not but perhaps I am missing something...
TIA
Matt
2006 Mar 11
2
Customising FCKeditor
I would like to customise my FCKeditor-instance so that when the "add
image" button is pressed, it opens my own add_image popup.
In this popup i would handle the image upload/image browser/etc. tasks
with rails.
How can I open the popup and pass the picture information from there
back to FCKeditor''s textarea?
--
Posted via http://www.ruby-forum.com/.
2006 Mar 20
24
Newbie Question about Custom Classes
Sorry if this is a complete newbish question, but I''m trying to wrap
my head around creating custom classes in my rails webapp. I''m
normally a Java developer, but I figured I''d give RoR a try and see
how I like it, and whether it would be useful for production use with
a new client.
Anyways, what are the best practices for custom classes? Where and/or
how do I create