similar to: conditional table association?

Displaying 16 results from an estimated 16 matches similar to: "conditional table association?"

2006 Jun 24
2
error log for views?
This may be a bonehead question, but when I have some error in a view I''m testing, the server spits out a generic page: "Application error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html" This is pretty unhelpful when I''m debugging. Is there an error log for Rails overall
2008 Sep 16
8
rspec, Rails 2.1.0, rubygems, Mac OS X Leopard - rubygems does not recognize latest version
I''m trying to run some specs on my Mac OS/Leopard machine (10.5.5) but rubygems won''t allow it: $ spec spec/models/my_spec.rb Rails requires RubyGems >= 0.9.4 (you have 0.9.3). Please `gem update --system` and try again. ...but I already have the latest & greatest installed: $ gem search --local rubygem *** LOCAL GEMS *** rubygems-update (1.2.0, 0.9.5) Tue Sep 16
2006 Jun 28
2
hash value won''t increment with =+ operator
I have a database of bookmarks and tags, and want to count the number of bookmarks each tag is assigned to, for example: user "tyler" has the tag "concerts" on 15 out of his 30 bookmarks. This code: hash = Hash.new("0"); @user.tags.each do |t| @user.bookmarks.each do |b| x = 0 if b.tags.include?(t) then hash[b.id] =+ 1 puts "hash is #{hash}
2006 Jun 22
3
create pie chart
Hi, I want to be able create a pie chart using rails, does anyone know of any plugin''s taht could help me here? Scott -- Posted via http://www.ruby-forum.com/.
2006 Jun 22
2
id column for join table... kosher?
I''ve got two tables, bookmarks & tags. Using a has_and_belongs_to_many association, I can do lookups using a join table called bookmarks_tags. Two questions: 1. Can I have a migration for my join tables? Rails seems to "know" about join tables implicitly from the associations, but if I do a rake migrate the join tables won''t be built. I''ve been
2007 Feb 10
1
Differences between IDLE when Maildir vs. wel the "mail" folder is used
Are there any differences with how both IDLE and "UID FETCH n:n+x (FLAGS UID...)" are handled when Dovecot is using a "mail" vs. a "Maildir" user? I have recently implemented support for IDLE (Push E-mail) in a client infrastructure that I'm building. I haven't in depth checked out what the problem might be, but when Dovecot was using the "mail" dir
2006 Sep 24
8
form_for and Multiple Models Being Saved
Howdy Folks, I want to use form_for to allow a user to submit a form that contains two instances of the same model. They are entering calendar dates and I want them to be able to submit 2 from the same form. Ok, so, using form_for, what is the best way to do this? form_for seems to be setup to handle a single instance in that it wants a name for the variable, etc... Has someone else done this?
2006 Sep 06
22
ROR host: dreamhost or godaddy?
hi all, i am looking for a host for my ROR web app. the target audience will be 70% from mainland china, and 30% from the rest of the world. i dont want a chinese hosst because: 1. it''s very slow for the rest of the world to access to it. 2. the speed is quite ok for china to access the us sites. both dreamhost and godaddy provide similar budget plans, and i saw them all from this
2008 Jan 28
4
GridTableBase
Hello all, i''m using wxruby 1.9.4 with Grid and the model class: "GridTableBase" like in the code below. But the method set_table of the grid does''nt work. Can anyone help me? require ''wx'' include Wx class MyGridTableBase < GridTableBase def get_attr row, col, attr_kind ## end def get_number_rows 0
2018 Oct 14
3
Centos7 & Selinux & Tor
I've just encountered a problem starting tor. When I do 'systemctl start tor' it fails and I get selinux errors in the log. There was suggestion to do full auditing with 'auditctl -w /etc/shadow -p w'. Which I did and it gave the following type=PROCTITLE msg=audit(1539540150.692:60570): proctitle=2F7573722F62696E2F746F72002D2D72756E61736461656D6F6E0030002D2
2018 Oct 23
0
Centos7 & Selinux & Tor
On Sun, 2018-10-14 at 20:13 +0200, Robin Lee wrote: > I've just encountered a problem starting tor. When I do 'systemctl > start tor' it fails and I get selinux errors in the log. There was > suggestion to do full auditing with 'auditctl -w /etc/shadow -p w'. > Which I did and it gave the following > > type=PROCTITLE msg=audit(1539540150.692:60570): >
2018 Oct 23
1
Centos7 & Selinux & Tor
On 10/23/18 2:49 PM, Robin Lee wrote: > On Sun, 2018-10-14 at 20:13 +0200, Robin Lee wrote: >> I've just encountered a problem starting tor. When I do 'systemctl >> start tor' it fails and I get selinux errors in the log. There was >> suggestion to do full auditing with 'auditctl -w /etc/shadow -p w'. >> Which I did and it gave the following >>
2006 Jun 07
2
script/generate scaffold pluralizes class names
Hi everyone, I''m a rails & ruby nuby, and this is my first post to the list. Here''s my environment in case it helps diagnose my problem: Ruby version 1.8.4 (powerpc-darwin8.6.0) RubyGems version 0.8.11 Rails version 1.1.2 Active Record version 1.14.2 Action Pack version 1.12.1 Action Web Service version 1.1.2 Action Mailer version 1.2.1 Active Support version 1.3.1 I did
2006 Jun 10
6
table associations
First, thanks to everyone who replied to my pluralization question from before! Today I was trying to do what I think is called a "chained accessor". I have an "events" table and each event has one user. Instead of seeing the id number for each event''s user, I''d rather display the names of users instead. I tried to do this: class Event <
2006 Jun 14
0
testing table associations
First, thanks to everyone who replied to my pluralization question from before! Today I''m confused by associations. I''ve set up a bunch of associations in my models to describe these relationships: - each user can have many bookmarks and tags - each bookmark can have many users and tags - each tag can have many bookmarks and users (Part of what is confusing is that I can
2006 Jun 21
3
rake migrate says table already exists
Hi all, I used the generate script to make a bunch of table migrations, resulting in files like 002_bookmarks.rb, 003_tags.rb, etc. When I did the ''rake migrate'', the db was set up but more migration files appeared, now called 009_create_bookmarks.rb, 010_create_tags.rb, etc. Now when I want to change the database (add a table or column, alter the schema) I do