Displaying 12 results from an estimated 12 matches for "genre_id".
Did you mean:
gene_id
2006 Jun 25
2
how to write the codes in view?(newbie question)
Hi.
I have two tables and want to join them.
<genres>
id
genre_name
genre_order
<links>
id
genre_id
name
symbol
url
order
display
etc
The code of links_Controller is like below.
def list
@links = Genre.find(:all,:include => :link)
end
Below is the mysql log.
SELECT genres.`id` AS t0_r0, genres.`genre_n
ame` AS t0_r1, genres.`genre_order` AS t0_r2, links.`id` AS t1_r0,
links.`genre_
id` AS...
2007 May 29
2
OpenVox A400P01on thin client?
Hello,
I'm thinking of ordering an OpenVox A400P01 (A400P + 1 PORT FXO Bundle)
for use in a old IBM 8364 thin client:
http://www.openvox.com.cn/products_detail.php?genre_id=9&id=28
http://silicon-verl.de/home/flo/software/netstation-8364/
Has someone already used this hardware with Asterisk, especially on a small
piece of hardware like this, and could offer some feedback?
Thank you.
2013 Apr 03
1
validates uniqueness scope allow_blank/allow_nil -> validation error
I have this in a model:
class GenreBadge < ActiveRecord::Base
belongs_to :game, counter_cache: :genre_badges_count, touch: true
belongs_to :genre
validates :game_id, uniqueness: {scope: :genre_id}, allow_blank:
true
end
When I get one existing genre badge
genre_badge = game.genre_badges.first
genre_badge.game_id = nil
genre_badge.save!
It creates an validation exception:
"ActiveRecord::RecordInvalid: Validation failed: Game has already been
taken"
I already have have specified...
2006 Apr 22
9
one to many question
1. A category has parent categories.
2. A product is in many categories and a category has many products.
3. Products and category both have images in the same image table. ie. a
product and / or category could have multiple images.<=== my question is
related to this
So among other things I presume I have to do the following:
class Category < ActiveRecord:Base
#...
2006 Apr 23
1
checkboxes for filtered search
...orking well.
What I want to do is have a user click on a checkbox [genres] and
have the content on the right be filtered based on the checkbox
ticked. If a user clicks on more than one checkbox than only those
stories are shown.
So for example the tables are like this :
*Stories*
id
title
genre_id
------------------
*Genre*
id
description
-------------------
*genre_stories*
stories_id
genre_id
How do I achieve this? I also want the checkboxes checked after the
page is refreshed to show the user the current filter applied.
Thanks,
Rob
2007 Oct 11
1
OpenVox A400P01 not detected
Hello
Has someone used the OpenVox A400P01 (ie. a supposedly
Digium-compatible A400P board with a single FXO module
www.openvox.com.cn/products_detail.php?genre_id=9&id=28) successfully?
I've put it in an older PC with a Gigabyte GA-7ZX motherboard, then a
more recent PC with an Asrock K8NF4G-SATA2: dmesg returns nothing :-/
Is there something specific that needs to be done in either the BIOS
or Linux to get this board to work?
Thank you.
2009 Jan 16
2
mini-PCI FXS card?
Is there any product that's a single port mini-PCI FXS card?
I'm aware of the Openvox A400M
<http://www.openvox.com.cn/products.php?genre_id=39>, but I really only
wanted one port.
How about a single or dual port PCI or PCI express FXS card?
Basically I wanted to build a small linux router with one or two phone
ports.
Alternatively, is there already a router or single board computer with
FXS ports that I could run linux/asteri...
2006 Mar 05
2
AJAX call chain and DRY questions
...but
these clearly are not available in the controller. How do I output the
array that I have gathered?
My view page looks like this:
<%= javascript_include_tag "prototype" %>
<%
@genre
%>
<%= start_form_tag :action => ''index'' %>
<div id="genre_id_box">
<%=select(:genre, :id, @genres2)%>
</div>
<%= end_form_tag %>
<%= observe_field("genre[id]",
:frequency => 0.25,
:update => "identities_box",
:url => { :action => :view_genre },
:with => "''genre_id='...
2007 Oct 08
2
Voice server
Hello
Now that I received an OpenVox PCI card
(www.openvox.com.cn/products_detail.php?genre_id=9&id=28), I'm ready
to try and set up a voice server with Asterisk.
We need the following features:
1. When customers call in, they should hear a voice menu asking them
which software they're calling about
2. Next, they should be able to leave a voice message to explain what
their prob...
2008 Jul 30
4
AssociationTypeMismatch: Genre expected, got String
Hi all
I have the following 2 models:
class CompactDisc < ActiveRecord::Base
belongs_to :genre
end
class Genre < ActiveRecord::Base
has_many :compact_discs
end
I have created a select box for my form so I can choose a genre for
every compact disc:
<p>
<b>Genre</b><br />
<%= f.select :genre, Genre.find(:all).collect{|p| [p.name, p.id]},
:selected =>
2005 Apr 16
1
Accessor not set
...attributes={"name"=>"Rock", "id"=>"1"}>
So the name attr is there. I just can''t access it because seemingly
there''s no accessor. Which is weird, because Rails should have defined
that for me, right?
Echo''ing <%=h band.genre_id%> or even <%=h band.genre.id%> works.
Any ideas?
Rob
2006 Apr 16
3
variable variables?
Hi everyone,
Does Ruby support variable variables like PHP
(http://www.php.net/manual/en/language.variables.variable.php)? Or do I have
to use eval, like
some_hash.each_pair{|key, pair|
eval "#{key} = #{value}"
}
Or is there some other way?
I''m actually trying to figure this out in order to use ez_where to create
its conditions from a hash, so if this isn''t even