Displaying 20 results from an estimated 4000 matches similar to: "PROBLEN IN AJAX USING RJS"
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,
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
1
Opening for Sr. Ruby On Rails Developers
Hello All,
Openings for a Sr. Ruby On Rails Developers in Ahmedabad based MNC IT
Company, Interested candidate can send their updated resume at
shikha.gadhia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org or call at 9824014448 for further details.
Salary no Bar for Right Candidate....!
Thanks
Shikha
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
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,
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)
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
2008 Jan 11
3
Date range queries return zero results
Hello,
I am having trouble getting data ranges to work correctly. I am using
the following command to load the db:
index << {:title => row[7].to_i,
:date => Date.strptime(row[3], ''%Y-%m-%d''),
:page_id => row[5].to_i,
:page => row[6].to_i,
:content_type => row[1].to_i,
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
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
2010 Feb 16
0
Strange routing(?) Issue
I have a Model event and the following two lines in routes.rb
1 - map.connect "events/:action", :controller => ''events'', :action => /
[a-z_]+/i
2 - map.resources :events, :has_many => :comments, :has_one
=> :address #, :collection => {:mapit => :get}
I have #1 so that I can call custom actions from a link_to_remote link
from my index page t0 update a
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
2008 Jul 16
2
params for link_to_remote
Hello :-),
i want to use ''link_to_remote'' to create a simple form on the website.
The form is a simple editor to post a comment to an article. I need to
know the article_id in the new view/controller. With ''render''
everything works fine, but ''link_to_remote'' doesnt work with :params :-
(
here is my code of the article view:
<div
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
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,
2010 Sep 11
10
Having difficulty with threaded comments, using acts_as_tree
I''ve been having problems making threaded comments for the last few
days. Mainly with creating children and displaying the children.
Currently, I have comments shown at the bottom of my articles show view.
The top level comments work, but I do not really know how to implement a
way for users to "reply" to the top level comments and take them to a
form (the comment
2007 Jan 05
1
Problen with vsftpd and chroot
I'm setting up a local mirror server on a CentOS4 box. I want it to serve
files over http, nfs and ftp.
I've set this up with the mirrored directories on a separate partition.
I've got the http and nfs working but am having some trouble with ftp.
I'm using vsftpd as the ftp server. I can log in to the ftp server and get
to the pub (/var/ftp/pub) directory. However when I try
2008 Feb 20
0
Run ssh problen
Hi:
I am a programmer.Now I port openssh and openssl to arm platform,but it
will show segmentation fault info when running ssh and others command
Version:openssh-3.9p1 openssl-0.9.7e
Thanks
QianLiGuo
2011 Apr 26
5
Correlaciones parciales
Muy buenas,
quiero calcular correlaciones de Pearson entre dos variables (a,b)
teniendo en cuenta una tercera (c). Para ello estoy usando una función
llamada "pcor.test" (http://www.yilab.gatech.edu/pcor.html), que en
realidad no está en ningún paquete de R, que yo sepa. ¿Alguien conoce
una función similar en alguna librería de R? Por otro lado, para ver
si me cuadraban los resultados,
2006 Apr 01
2
ActiveRecord callbacks not called
Hi, there must be something wrong somewhere in my unit test because
there''s a model I can''t have any callback executed on.
In my unit test I do
@image = Image.new
@image.set_uploaded_file({:file =>
uploaded_file("pic1.jpg","image/jpeg","article-picture.jpg"),
:article_id => @article.id,
:title => ''Titre
2003 Jul 16
1
Problen in cbq , fw
Hi,
In my LAN Iam trying to make following setup:
- All the traffic generated by 10.0.2.1 should go to 10.0.2.11,
If
the destination of this traffic is internet than it should be
placed on its interface eth1. Outgoing traffic on eth1 should be
shaped.For this I am using fw filters and cbq.
_______
10.0.2.1 -------> 10.0.2.11(eth0 )----| A