Displaying 20 results from an estimated 104 matches for "project_ids".
Did you mean:
project_id
2011 Oct 16
2
question: ragged array
Hello,
I have a big problem which I’m just not able to solve.
I created the following mean value from the following dataset structure:
Id |value
1 | 2
1 | 3
1 | 4
2 | 2
2 | 1
3 | 5
4 | 3
etc.|etc.
with the command:
mean_rating <- tapply(ratok$value, ratok$project_id , mean,simplify = FALSE)
this gives me a ragged array:
> mean_rating [1]
$`14`
2007 Jul 22
2
Seek brilliant Rails programmer to add one field to acts_as_taggable
I''m on the downhill side of a large project that requires an
additional integer field to be added to the tag.rb in
acts_as_taggable. I feel I have a good understanding of ActiveRecord
and have performed the correct migrations.
(As a short background for those following this thread) when one wants
to add tags to a model they call the ''tag_with'' method that jumps into
2008 Jun 13
2
Rails 2.1.0 - find with :include and missing JOIN in SQL query
Hi,
We''re trying to rewrite veeeery old Rails app that we successfully
managed to move to 1.2.6 and now we''re trying with 2.1.0.
One of the problems is caused by :include in AR.find. Rails 1.2.6
generates totally different SQL query than
2.1.0. Here''s Rails find query and generated SQL queries:
Foo.find(:all, :include => :ticket, :conditions =>
2006 Jun 01
4
can''t convert Fixnum into String ??
I have been getting this error message on various pages, just wondering
if anyone could explain whats going wrong, and the best way to correct
it
code that is cuasing the problem is below
@project = Project.find(:first, :conditions => "id = " +
@purchaseorder.project_id)
--
Posted via http://www.ruby-forum.com/.
2007 Nov 02
5
RSpec, RESTful nested routes and :path_prefix
Dear list,
In the app we are making we have a rout something like this:
map.resources :projects do |projects|
projects.resources :pages, :controller
=>"Wiki::Pages", :path_prefix => "/projects/:project_id/
wiki", :name_prefix => "project_wiki_"
end
But I can''t get RSpec(I''m very new to it) to accept this. It keeps
throwing errors:
2007 Nov 14
6
a few add_index questions..
on previous apps i hadn''t really worried much about adding foreign key
indexes on my tables just because they''ve been fairly small and i
didn''t really think i needed them.
well, i''m working on something now that has the potential to have a
lot more data, and a lot more foreign keys.
so i have 3 tables... users, projects, and tasks.. should i be using
add_index
2008 Oct 30
1
Nested Resouces,not getting parent id(project_id) from form
Hi
i am using nested resources,here project having has many relation with
defects.
Main problem here is i am not getting project_id from edit form.What''s a
problem if any one knows please help.
edit.html.erb
<% form_for(@defect,@project) do |f| %>
<%=f.text_field :name%>
<%end%>
routes.rb
map.resources :projects,:has_many=>:defects
map.resources :defects
2007 May 06
1
validates_uniqueness_of (with :scope) doesn't seem to work?
I have a master record called ''project'' and a child record called
''agycode''. Obviously, agycode has a project_id FK. I wish to make the
"descr" field unique ONLY within the ''project_id'' ''scope''. Here are the key
pieces of information
Agycode fields (id, project_id, descr)
Here''s the declaration in the
2008 Sep 06
6
Active record question
I''m not quite sure how to get at this data using Actrive record.. I''m trying to get all the appointments made for a particular project. I''m using four models, Projects, Tasks, Resources and Appointments.
The SQL gets me what I''m looking for but how do I do it using Active Record?
Select a.* from appointments a
join resources r on r.id = a.resource_id
join
2012 Mar 26
3
render :json not sending any data back ...
[rails 3.2.2]
I perform an ajax call :
...
$.ajax
url: " /backoffice/expenses/rate"
type: "GET"
dataType: "json"
data:
project_id: $(''#project_id'').val()
code: $(this).val()
success: (result) ->
alert result
$(''#expense_price'').val(result)
in
2005 Nov 16
1
HABTM: deleting records based on attributes
Hello All,
I am new to ROR, and can''t seem to get HABTM to cooperate entirely...
however I might be abusing it! Before I try a different strategy I
thought I''d ask here and see if I''m missing something simple.
So say Projects and Companies are related. Projects can have multiple
Companies, and Companies can be on multiple Projects. But, the same
Company can also
2006 Apr 25
4
Newbie - Grouping of items...
I''m trying to build a dashboard type page (similar in function to
basecamp''s) where I can show the last 5 updated items from my 3
differing models, then grouped together by project.
Solution ideas:
(1) Is it best to create a log model where everytime I add or update
another model (like messages, comments, lists etc) an enrty gets added
to the log along with the project. I
2006 Jan 16
0
belongs_to with has_and_belongs_to_many
I''m having a problem with belongs_to and has_and_belongs_to_many.
Here''s a brief summary of the models involved:
class Member < ActiveRecord::Base
set_primary_key ''member_id''
has_and_belongs_to_many :projects, :join_table => ''projects__members''
has_many :projects, :foreign_key => ''created_by''
end
class
2007 Apr 25
2
form_remote_for, reloaded
Hi,
being relativly new to RoR, I''m having a problem which I found described
in this forum and somewhere else - but with no solution. I know, that it
may be bad to mix table and form tags, but the first solution of an in
place editing within a table looked nice:
Version using form_for:
<tr>
<%form_for :time_record, :url => { :action => "add_time_record" } do
2006 Apr 16
2
Making requests in order
Hello all,
This is an interesting problem I have been working on. What I have is a
little multiuser project request tracking application. What happens is
that I log in and create projects and assign people to the projects.
Each project has steps associated with it, and the steps need to be done
in a certain order. Now, I have to request that the assigned person
perform each of the steps, and
2006 Feb 11
6
Rails Edge, has_many :through in searches
I have two tables, a Projects table and a Clients table.
It''s basically a HABTM relationship, but I have additional project/
client-specific information in the join table. I''m trying to use the
new has_many :through method to join these. It works fine when
displaying records, but when I try to search, I''m having this problem:
When I used a HABTM model to search
2005 Nov 19
3
Form values not included in submit when ajax generated.
Hi.
I have a form with two select lists, named ''project'' and ''activity''. The
content of the ''activity'' list is changed when the selected item in
project changes, using ''observe_field'' where project is observed, and a
div enclosing ''activity'' is updated. This works as expected. The problem
is that when
2012 Jun 30
5
Problems with associations
Hello guys, I have two tables, tasks and projects, and each model I put:
Task.rb
class Task < ActiveRecord::Base
attr_accessible :user_id, :project_id, :name
belongs_to :project
end
Project.rb
class Project < ActiveRecord::Base
attr_accessible :name, :description
has_many :tasks
end
But when I go to my prompt and I make a SELECT with task, none project
is returned.
2006 May 08
4
set forign key
hi,
got a small problem below and not to sure how to overcome this using
rails
two tables involved with this projects and quotes
each project has a field quote_id as a forign field.
When a user is ready to upload a quote they are linked to quotes/new
from the show project page. Once the quote is uploaded how can I then
set the quote_id field with the correct key?
--
Posted via
2006 May 31
1
find by sql
Hi
I have the following code, which makes use of an sql statment to get the
results required.
However this just doesnt seem right for rails, as ive managed to develop
the whole project without using any other pure sql.
Is there a cleaner way of doing this, but gaining the same results.
thanks
scott
#sql to find all invoices
pSql = "SELECT DISTINCT invoices.id,