similar to: ForumExample

Displaying 20 results from an estimated 600 matches similar to: "ForumExample"

2006 Mar 23
3
when (not) to use belongs_to
I know you get a lot of questions like this, but I couldn''t find one which answers exactly what I''m after. I''m reasonably new to rails, and I''m having a bit of trouble with when to use belongs_to. On the rails wiki ( http://wiki.rubyonrails.org/rails/pages/belongs_to), it says "In general, the Foo model belongs_to :bar if the foo table has a bar_id foreign
2007 Feb 08
3
Get categories where forum-user posted in
I''m developing a system similar to the ForumExample (http:// wiki.rubyonrails.org/rails/pages/ForumExample), and stumbled upon the following. Let''s say I wanted to get all the categories a certain user posted in. How do I get that information withouth using a custom query through :finder_sql (and thus losing the find_in_collection ownage)? It would also be great to see how many
2006 Aug 01
3
Upload file to file system and sql insert date errors
I''m trying to use one form to upload a file to the file system and insert a title and description field into the database. I have no problem uploading files to the file system using the code from http://wiki.rubyonrails.com/rails/pages/HowtoUploadFiles There are more fields on the form than need to be inserted into the database, name and file. I need to pull out these extra fields
2006 Aug 03
1
Is Ferret the standard rails search engine?
Is Ferret the standard rails search engine? I''m looking to search the file system and MySQL. TextSearch is working fine for MySQL. http://wiki.rubyonrails.org/rails/pages/TextSearch Is Ferret the solution that most people are using for documents in the file system? Thanks. Greg -- Posted via http://www.ruby-forum.com/.
2006 Jan 19
4
Relationships... not the personal kind!
Hello all, I''m very new to Rails and I love it so far. However, there are some things that aren''t so clear to me. Let''s say a blog post can have many comments, and a comment can only belong to one post. A user can have many posts and many comments as well. (this part makes perfect sense): class Comment < ActiveRecord::Base belongs_to :posting belongs_to :user
2007 Mar 29
21
a better "should have valid associations"
This is pretty much the same as last time around, if you recall. Thanks to Wilson for converting to the new form. I''ve added a few lines. Basically, it iterates over your model associations and does two things. - First, just try to call the association. Usually fixes speeling erors or other such silliness. - Second, try to find a record with an :include on the association. This
2011 Mar 01
11
Did rails or shoulda go insane on the inflection of 'taxes'?
I have a model ''xp_jurisdiction_taxes'' which rails (3) created correctly. Another model ''xp_jurisdiction_states'' has many :xp_jurisdiction_taxes. In my spec I am using a shoulda helper to test the association but get the following error. BTW, greped the whole project just in case and the string ''taxi'' exists nowhere. 1)
2006 Jul 28
11
Forum
Im making forum and i have problem with paths. Here is code: http://pastie.caboo.se/6389 With this code, it works. But its a bit weird to use so many paths function. For every path i need to make new function. So can you suggest me something. Tables are like here: http://wiki.rubyonrails.com/rails/pages/ForumExample -- Posted via http://www.ruby-forum.com/.
2006 Mar 15
5
acts_as_threaded - help ???
Hi, has anyone successfully used the acts_as_threaded plugin with postgresql? I''m using rails 1.0 and ruby 1.8.4 on linux. Following the screencast on http://www.railtie.net/articles/2006/02/05/rails-acts_as_threaded-plugin , I got to where we''re ready to create our first post, having made the changes to controllers/posts_controller.rb, views/posts/_form.rhtml,
2007 May 05
4
autogenerated it (was ''Custom Matcher and NAME NOT GENERATED annoyance'')
> On 5/5/07, Luis Lavena <luislavena at gmail.com> wrote: > > describe "A User (in general)" do > > before(:each) do > > @user = User.new > > end > > > > it { @user.should have_many(:contest_public_votes) } > > it { @user.should have_many(:design_industry_user_interests) } > > it { @user.should
2006 Feb 24
6
MySQL client used in online presentation?
Hi, could someone tell me the name of the MySQL that''s being used with the online presentation: http://media.rubyonrails.org/video/rails_take2_with_sound.mov Thanks in advance, -Conrad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060224/bdf999b0/attachment-0001.html
2007 Jun 04
2
access to acts_as_threaded
Hi, I have trouble accessing the acts_as_threaded plugin at http://railtie.net looks like the site is down. Does someone have a copy? or knows an alternative repository for the plugin? please you can zip it to to this address georgkam[at]gmail[dot]com Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2011 Jul 11
36
has_many and belongs_to association
Hi , I want to test the one below but I got the problem belongs_to :name, :class_name => "Phrase", :foreign_key => "name" in my test context "test"do should have_many :phrases end in language.rb belongs_to :name, :class_name => "Phrase", :foreign_key => "name" error is 1) Failure: test: check has_many and belongs_to
2011 Sep 14
1
rspec and should have_many through
Hi, Anyone can help me with rspec shoulda validations please. I can''t get the syntax right for these validations. Please correct me it { should have_one :tradable, :through => :trade_order} it { should belong_to :source, :polymorphic => true } it { should have_many :transfers, :as => :source } this is for Rspec 2, rails 3.1, gem "rspec-rails" gem
2009 Jun 27
6
User has many topics or subtopics
Hi, So i have users in the system and i have topics. Topics also have_many subtopics. What is the cleanest way to setup the AR relationships if a user can either have_many topics or subtopics ? Its basically a dual select box dropdown, where the second dropdown is optional. Is the best to have user_topics, and user_subtopics tables and manage that way ? or combine into one table with STI
2006 Mar 22
10
Need for multiple acts_as_list
I have a model "Childmodel" that belongs_to two other models "Parent1" and "Parent2". "Parent1" "has_many :childmodels, :order => :positionp1" and "Parent2" "has_many :childmodels, :order => :positionp2". i.e. The child is independently positioned within each of its parents. This works fine and gets me the useful
2007 Oct 19
11
Patch idea for rspec_on_rails
I recently wrote a matcher for testing AR associations which allows you to specify things like: Foo.should have_many(:bars).through(:bazes) I''m pretty darned proud of it and a couple of people have suggested that I should submit it to the rspec_on_rails project. Before I go to the trouble of writing out rdoc and fully spec''ing it, I just wanted to make sure this was
2008 Jul 17
2
What is the MySQL app used in the 15 minute weblog video
On the "Create a Weblog in 15 Minutes" screencast on the Ruby On Rails site http://media.rubyonrails.org/video/rails_take2_with_sound.mov There is a really nice looking MySQL gui interface app. Can anybody tell me what the app is? I''m actually looking for a Linux version. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2012 Jan 27
3
How to test the model dependence ?
Good morning, I''m new to rails and am having some basic questions in development. See if anyone can help me with a test problem. I need to test if my model "Procedure" is linked to the workflow. If not, the system must acknowledge an error. Below is the code that is in the file test \ unit \ procedure_test.rb. require ''test_helper'' class ProcedureTest <
2011 Jun 30
8
Error of DEPRECATION WARNING
Hi, I Have a strange error when i type the command "rake db:migrate " Can you help to solve this error or give me some advices the error is: DEPRECATION WARNING: Rake tasks in /home/joanne/Desktop/picto/vendor/ plugins/prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks instead. (called from <top (required)> at /home/joanne/Desktop/picto/ Rakefile:7) thanks for help