Displaying 20 results from an estimated 4000 matches similar to: "Concatenation"
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 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 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 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
2006 Feb 15
3
Applying list-item format depending on action
What would be the best way to do this? I have a list and I want one
item to be underlined (depending on the action that I am on). Do I?:
Have a bunch of if statements:
if :controller => ''admin'', :action => ''list''
<li id="current">Pages</li>
else
<li>Pages</li>
end
What do you think? Is there a
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 Jun 21
5
Polycom Intercom - almost there
Ok so I added to my Freepbx config running Asterisk 1.2.4 in
extensions_custom.conf
; intercom
exten => _7XXX,1,SIPAddHeader(Alert-Info: Auto Answer)
exten => _7XXX,2,Dial(SIP/${EXTEN:1},12,Tt)
and configured my Polycoms via this page
http://www.voip-info.org/wiki/view/Polycom+auto-answer+config for auto
answer and that works fine if I dial 7 then the 3 digit extension.
No
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 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 Feb 09
1
Polycom remapping SpeedDials
Hi -
Has anybody been able to successfully remap SpeedDials on Polycom phones?
The manual seems to indicate that you can, and I followed the advice in this
list message:
http://lists.digium.com/pipermail/asterisk-users/2005-October/129142.html
The result I get is that the remapped buttons act as the VolumeUp button,
rather than as a speed dial. My configs look like this:
<Mac
2006 Feb 01
1
RE: Euro-ISDN
asterisk-users-request@lists.digium.com is believed to have said:
>chan_capi does not set the NT-mode. Your cards driver need to do that.
>E.g. for Eicon DIVA Server cards, you just set the '-x' option with divactrl
>or set NT-mode in the config wizard.
>chan_capi does not (need) to know anything about what protocol the card is
>doing. CAPI is independent here.
Ok.
2006 Jan 04
5
check if a file exists?
Hello all!
I have a list of people on a page, and some of this people have pictures
of them stored on the web server. So I have an image tag like this on my
page:
<%= image_tag "/images/people/" + person.pers_id.to_s + ".jpg" %>
But not all have a picture, so if the file for pers_id=1899 does not
exist, i would like to display a custom image for that guy.
How can I do
2006 Feb 13
2
Scaffolding
So what is "best practice" using scaffolding and then manipulating it to
work for you or starting from scratch?
Thanks.
Seth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060213/0f16d567/attachment.html
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 Mar 16
3
ACLSystem and session variables
I am using the ACL System that is described on the Rails wiki and I have
a quick question. I want to set the "role" as a session variable so
that I can display certain navigation schemes and I was doing it like
this:
@session[:user][:role] = @user.roles
When I print out this variable I get:
#<Role:0x3262d80>
How can I turn this into a readable value? I tried .to_i
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 Jul 20
3
[OT Ruby] Displaying a binary ?
How to I display the binary equivalent of a number? I tried this:
b = 0b1101
puts b # returns decimal value ( 13 )
b.to_bn # generates "unable to convert FIXNUM to STRING.." error.
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory alternative."
--- E.Taft Benson
-------------- next part --------------
An HTML attachment was scrubbed...
2006 Feb 17
2
Helpers?
Would I use a helper for this situation?
I have a layout that is used over two controllers (admin and login).
Each controller has their own navigation. Can I do something like this?
<%= getNavigation("admin") %> or <%= getNavigation("login") %>
And return the navigation list depending on the string sent?
Seth Buntin
-------------- next part
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