similar to: Date range queries return zero results

Displaying 20 results from an estimated 3000 matches similar to: "Date range queries return zero results"

2007 Jul 19
3
Merb::Controller#url Usage
I have a question about the usage of Merb::Controller#url. When I have nested resources, requesting the new action works differently than I expected. I was wondering what the intended usage is. For example: Say I have r.resources :articles do |article| article.resources :article_attachments end irb(main):002:0> show_routes [:articles, "/articles"] [:article_attachments,
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id'' I have a Model class like the following: class Article < ActiveRecord::Base set_primary_key "ARTICLE_ID" end however, using a link_to like the following (modified scaffolding), the link has no id value: <% for article in @articles %> <tr> <% for column in
2010 Mar 27
2
Shorter Rails 3 routes
Hi, I have a small blog application, and I would like to shorten its routes. Here they are: Blog::Application.routes.draw do resources :categories do resources :articles do resources :comments end end A rake routes command produce the following lines: GET /categories/:category_id/articles/:article_id/comments(.:format)
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have article_groups as a jointable. Now I want to select every article who is a member of group with id ''1'' and id ''2''. Whats best way to get that? Extract from schemas: CREATE TABLE articles ( id int auto_increment, ingress text NOT NULL, story_text longtext, constraint fk_items_users
2011 Dec 16
3
PROBLEN IN AJAX USING RJS
I am using rails 3. I have problem in out put so please tell me my mistake routes ------- entermatch ''/view_article/:user_id/:article_id'' => ''articles#view_article'', :as => :view_article resources :users do resources :articles do resources :comments end end article controller ------------------ def view_article @user =
2009 Nov 12
1
Please help me ------ Mapping an item to article
Hi everybody, I have a form like this <h1>New menuitem</h1> <% form_for(@menuitem) do |f| %> <%= f.error_messages %> <p> <%= f.label :title %><br /> <%= f.text_field :title %> </p> <p> <%= f.label :alias %><br /> <%= f.text_field :alias %> </p> <p> <%= f.label
2006 Aug 14
4
Controller method problem
Hi, I have a def in my controller see below where i want to find the page object based on a parameter value and then use the page_id to then find all the contents that belong to that page in the same method. Controller def aboutus @page = Page.find_by_name(params[''About Us'']) @contents = Content.find(:all, :conditions => "page_id = #{@page.id}") end
2006 Jan 09
4
Problem with habtm and resulting SQL insert
Cheers, I have a problem with 1.0 and a habtm relationship between User and Article. I want to save all articles that users read. I have these models: class User < ActiveRecord::Base has_and_belongs_to_many :read_articles, :class_name => "Article", :join_table => "read_articles" ... end class Article < ActiveRecord::Base has_and_belongs_to_many :readers,
2009 Jul 17
1
attachment_fu :partition => lamda {}
Hi - I am trying to dynamically create my partition folders via attachment_fu. I have read about a hack that allows you to do this on the attachment model: :partition => lambda {|a| a.article_id} Which passes the model''s object into the lambda and uses the ''article_id'' attribute as its directory name. However, this isn''t work for me. I think the lambda
2006 Mar 04
1
active migration gives undefined_method ''string_to_binary''
has anyone ever seen that: c:\rails\test>rake migrate --trace (in c:/rails/test) ** Invoke migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute migrate rake aborted! undefined method `string_to_binary'' for ActiveRecord::ConnectionAdapters::ColumnDefinition:Class
2008 Aug 22
1
smbclient: tdb_fetch_uint32 failed
hi all, I'm facing a problem with a brand new installation on fedora 9. packages were updated right after the installation, so the samba packages are of the latest available version (3.2.0-17.fc9). at the first run were created all the tree of tdb files under /var/lib/samba. now I create a new user: [root@barbara Scrivania]# smbpasswd -a barbara New SMB password: Retype new SMB password:
2001 Apr 25
1
help stable
Please, I need help in the part stable from R. I can?t plot the distribution function of a stable law. I obtained bad results. But the density function is OK. How can I do it? Sorry, I?m Brazilian and my english isn?t good... Thanks, Barbara Patricia Olbermann Instituto de Matem?tica Universidade Federal do Rio Grande do Sul - Brasil barbara at athena.mat.ufrgs.br
2008 Dec 31
1
resource api docs not working for me
Hi, ruby 1.8.4, rails 2.2.2, mongrel 1.5.1, win xp I read in the docs that this : map.resources :articles do |article| article.resources :comments end should result in this lot: article_comments_url(@article) article_comment_url(@article, @comment) article_comments_url(:article_id => @article) article_comment_url(:article_id => @article, :id => @comment) So when I did
2009 Sep 19
2
MethodNotAllowed
I am trying to develop an application that allows users to submit articles and add information about the references they used when citing facts. I have the sources broken down into types, such as books, periodicals, web-sites, etc as single table inheritance on the sources table. Routes are nested so that :articles, :has_many => :sources When trying to edit a source, through the
2006 Jul 22
12
Community request - can someone show me REST?
I mentioned this in another thread, but I''ve got a formal request now. After reading tons of stuff about REST, I don''t really get it. I need to see an example. I''d like someone to write up an example blog app with these requirements - RESTful using the simply_restful plugin (or edge rails) - allows posting of comments to articles - has categories for posts No need
2001 Apr 05
2
New type of copy-protected audio CDs are coming...
>From the article: "The record business wants to lock down songs on a new breed of CDs. Is this the end of rip, mix and burn? We visit the labels' laboratories to learn more about what 'stickiness' means to music." Read the full article here: http://www.inside.com/jcs/Story?article_id=26900&pod_id=9 Oh, and CDparanoia is mentioned in the article :-) Greetings,
2007 May 27
3
Scaffold and foreign keys
Hello, I create a migration to add a foreign key ''page_id'' to a table ''main_sections''. After running the migration and adding the column, the scaffol that I have on the main_setions table does not add the foreign key into the CRUD. Any ideas why this is the case? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because
2003 Mar 17
3
Error in file(file, "r")
Hello, I am a new user of R, and I am not able to read/scan external files. I am working in a Linux environment. I have read through the R FAQ and documents and have not been successful using the recommendations. Below are several scripts I've used and the error messages. . I've cc'd Brandon Whitcher because it was recommended in another FAQ. I read that this is a bug that
2006 Mar 31
10
ruby help / if (cond or cond)
Why this code doesn''t work as expected? It raises exceptions everytime. Tried with || operator, too. validates_each :x, :y do |record, attr| record.errors.add (attr, ''between 1 and 100'') if (attr.to_i>100 or attr.to_i<0) end -- They say money can''t buy happiness? Look at the smile on my face... ear to ear, baby!
2009 Sep 01
2
numerical summaries across variables.
Hi Every one, I have a dataframe "class" with "name", "sex", "age", "height", "Weight". if i caluclate summary statistics with the below code numSummary(class[,c("Height", "Weight")], groups=class$Name, statistics=c("mean", "sd", "quantiles"), quantiles=c(0, .25,.5,.75,1)) iam getting