Displaying 20 results from an estimated 1000 matches similar to: "Sending parameters for filtering"
2006 Mar 01
2
Help with Many-To-Many insert
I am having issues with a many-to-many table. The table relates
resources to standards, but in my resources table has one-to-many
relationships so those also appear in my many-to-many table. I am
trying to insert into the table via:
@resource.core_contents << CoreContent.find(params[:core_content_ids])
But I get this error:
Mysql::Error: Duplicate entry
2006 Feb 21
7
Validation issues
I have a form. Everything submits into the database if I don''t have any
validation rules. When I put these rules:
validates_uniqueness_of :title, :message => "already exists in
database"
validates_presence_of :title
I get this error (which seems weird because I am not validating against
that):
You have a nil object when you didn''t expect it!
You
2006 Feb 23
1
OT: Collaboa on Debian
I am running a subversion server (on Windows) but I would like to run
Collaboa. I am pretty familiar with the Linux world (not in a developer
sence) and I am having problems with installing the prereqs for
Collaboa. I have read the article "How to install Collaboa on Debian"
but it doesn''t seem to work for me. Has anyone gotten this working and
can help?
Seth Buntin
Web
2006 Mar 02
0
Select from Many to Many
Here is what I have:
add_core_content.rhtml:
<select id="resource_core_content_ids"
name="resource[core_content_ids][]" size="15" style="width: 200px;"
multiple="multiple">
<% @core_contents.each do |c| %>
<option value="<%= c.id %>" <% if @resource.core_contents.include?
(c) %>
2006 Feb 17
4
Why doesn''t this work!
I have this in my controller...
@tech_standards = TechStandard.find_by_sql("SELECT * FROM tech_standards
WHERE subpoint <> 0")
Everything is fine except when I look at my view I still get supoints
that are 0. When I run this query in my query browser I don''t.
View:
<select name="resource[tech_standard]" id="tech_standard">
2006 Feb 21
4
Error, got String?
I am getting this error.
ActiveRecord::AssociationTypeMismatch in Resources#create
Focus expected, got String
I have a select menu named resource[focus]. My focus (belongs_to
:resources) table has a one-to-many relationship with the resources
(has_one :focus) table (A resource will have only one focus but one
focus will have many resources). I assume this error means that the
focus is
2006 Feb 10
3
RoR, Apache 2, FastCGI
I have everything working and I am really excited about learning Ruby
and Rails. But whenever I access my different defs in my controller it
takes ~ 5 seconds before they are returned. I am working locally so I
don''t know what the issue is.
System Details:
Windows XP
Apache 2.0.55
Ruby 1.8.2
Rails 1.0
Seth Buntin
Web Resources Coordinator
Kentucky Academy of Technology
2006 Feb 21
4
Select error
This code:
<p>
<label for="resource_type">Type</label><br/>
<%= select(:resource, :type, %w{ Web Data }, { :include_blank => true
}) %>
</p>
Produces this error:
TypeError in Resources#new
Showing app/views/resources/_form.rhtml where line #6 raised:
wrong argument type String (expected Module)
Extracted source (around line
2006 Feb 22
2
Select menu validation
Is there a trick to validating select menus? I have this rule:
validates_presence_of :title, :type
:title is a text box and validates correctly but :type doesn''t:
<p>
<label for="resource_type">Type</label><br/>
<select name="resource[type]" id="resource_type">
<option value=""
2006 Feb 28
1
Accessing form array when errors display
Is there a way to access (from JavaScript preferably) the form array of
the information sent when errors are display? I want to be able to find
out what values were selected on the form before errors.
Seth Buntin
Web Resources Coordinator
Kentucky Academy of Technology Education
Murray State University
On March 1, 2006, Murray State University will begin moving all of its
telephone
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
2006 Feb 13
7
Concatenation
I have this:
<%= @tech_standard.category + " " + @tech_standard.point + "." +
@tech_standard.subpoint %>
I get this error:
cannot convert Fixnum into String
point and subpoint are number.
How do I concatenate those values?
Seth Buntin
Web Resources Coordinator
Kentucky Academy of Technology Education
Murray State University
--------------
2006 Apr 03
5
Newbie question about acts_as_taggable
I installed the acts_as_taggable plugin that DHH wrote.
Now I have met problems on using it:
class Book < ActiveRecord::Base
acts_as_taggable
end
mybook = Book.new
mybook.tag_with(''red library book'')
But the system tell the wrong message:
undefined method `parse'' for Tag:Class
d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1123:in
2006 Feb 12
7
ROR Recipes Beta: Why use taggings instead of tags_contacts? NoMethodError tag_with?
I have gotten acts_as_taggable to work for a test application as documented on taggable.rubyforge.org
I am following Chad''s excellent examples in ROR Recipes Beta book.
I have a few questions and hope that Chad or some other expert can help clarify them.
1. Why is the book suggesting to use taggings table instead of tags_contacts, as mentioned on taggable.rubyforge.org?
2006 Mar 04
7
Get ID after save
This is simple (I am sure) but how do you get the id of the inserted
element after the element has been save?
I thought it was something like this:
@product = Product.new(params[:product]
if @product.save
add_image(product.id, params["image"])
flash[:notice] = ''Product was successfully created.''
redirect_to :action => ''list_products''
end
2006 May 19
0
Works in model but not in mixin
Disclaimer: RoR newbie. Using the acts_as_taggable plugin.
As an exercise I wanted to switch from the destructive TAG_WITH method
to adding tags while preserving the existing ones. On the surface this
seemed easy enough and eventually I got it working. However, the
following method:
def add_tags(list)
Tag.transaction do
Tag.parse(list).each do |name|
if
2006 Feb 16
0
Observer two fields?
Can I observer two fields? I have a select menu for subject level and a
select menu for content area and I wasn''t to get all fields from a table
that correlate to that
@cores = CoreContent.find(:all, :condition => "subject =
''@params[resource_subject_id]'' and level =
''@params[resource_level_id]''")
Seth Buntin
Web Resources
2008 Feb 26
1
problem with posting with acts as taggable on steroids
hi all
i''m trying to have a post with tags included but i''m getting
undefined method `tag_with''
i''ve already added acts_as_taggable to the model
and on the controller the code for creating the post is:
def create
@post = Post.new(params[:post])
@post.tag_with(params[:tag_list])
@post.user = current_user
if @post.save
redirect_to
2006 Mar 17
7
OT: Subversion folder cleanup
How do you clean up your app folder to place onto the server? I want to
get rid of all the .svn stuff.
Seth Buntin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060317/cc81d9f7/attachment.html
2006 Apr 13
0
Model with file uploads
I''m working on a model for a videos table that include the video info
(title, description) and a couple of uploads (video file, thumb image)
I was going to use the file_column plugin but I dont like the idea of
storing the file names in the database when I dont need to, plus I dont
think it is very flexible.
Here''s what I done. What do you think of this? Any suggestions?