Displaying 20 results from an estimated 1000 matches similar to: "has_many and belongs_to association"
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
2011 Jul 05
7
error of "rake test" command
Hi,
I have an error when i use rake test, plz help
akyen@ubuntu:~/Desktop/p$ rake test
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method Pictographs::Application#task called at /usr/local/
lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:
215:in
2011 Jul 05
4
Problem of "rake spec"
Hi all,
I am a bit confused when i type rake spec and it gives me this
message,
No examples matching ./spec/**/*_spec.rb could be found
what is that mean that something is not found.
and where i can input my the test code because i did have a tiny
sample code in user_controller_test.rb.
is that the right place to test functional..
plz give me a help
thanks
--
You received this message
2011 Jun 15
11
Problems with " wrong number of arguments (2 for 1) (ArgumentError) " and rails server
Hi, I''m trying initialize my local rails server but I haven''t can,
because when I write "rails server", show me this message:
=> Booting WEBrick
=> Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/
2006 Apr 24
9
Confusion with expressing many to many relationship
Hi folks, I am in the process of converting an existing non-rails
application to rails, and am not sure what the best approach would be
for specifying the relationship between the two sets of data.
I''ll describe the existing table structures first.
Table 1: Urls
Each url has a unique id and two lists of Phrases, these are currently
setup as varchars with "," delimitation -
2006 Apr 29
2
Seeing performance problems with has_many :through relation
Greetings all, I am looking for some insight from some of the more
experienced with has_many :through relationships as I am having a hard
time reconciling the performance I am seeing.
I have 2 tables that are linked together via has_many :through
Table 1: urls ( there are about 7,000 records )
2 fields, id and url
Table 2: phrases ( there are about 87,000 records )
2 fields, id and phrase (w/
2006 Apr 28
9
Q: Timing of render :update in an action ?
Hey folks, am hoping someone can set me straight with a solution to an
issue that has come up involving the timing of rendered page elements in
relation to the completion of an action''s execution.
I have an ror search app which searches through two tables consisting of
7,000 page urls and a table w/ 87,000 related keyphrases within those
pages. Search results can take anywhere from 2
2004 Aug 18
3
downloading the R program
I am trying to download the R program, but am having trouble. I have
read through the instructions, but do not seem to be able to do it
properly. Can you tell me the step-by-step instructions?
Joanne L. Butler, Post-doctoral Fellow
Equity and Technology Research Project
c/o Department of Sociology
Acadia University
Wolfville, N.S. B4P 2R6
phone (902) 585-1535
fax (902) 585-1769
2011 Aug 26
3
elegant way to check if 2 values are in 3 columns?
Dear all,
I'm trying to rerun some data linkage exercises in R (they are designed
to be done in SPSS, SAS or STATA)
The exercise in question is to relabel the column "treat" to "1", if
"yearsep" is smaller than 1988 and columns "proc1"-"proc3" contain the
values 56.36 or 59.81.
My pathetic solution to do this in R currently looks like
2006 Mar 23
4
belongs_to more than one model
Suppose I have one table:
states
id
statename
And I have two other tables that contains states:
houses
id
color
state_id
places
id
place_name
state_id
How would my model relationships look like?
class State < ActiveRecord::Base
belongs_to house
belongs_to place
end
class House < ActiveRecord::Base
has_one state
end
class Place <
2008 Sep 13
3
R rpm for Mandriva 2008.1 ?
Are there any R rpm's for Mandriva 2008.1? I found a couple of dodgy
ones that wouldn't install so far (rpmfind.net).
(Sorry that seems so far the only Linux distribution that recognizes my
hardware on my new laptop correctly. I'm more familiar to Fedora and
Suse so perhaps I'm just doing something wrong?)
Joanne
2006 Jan 06
4
Are migrations executed within a transaction?
Hi all,
Can I safely assume that each migration is excuted within a
transaction, so that''s it''s safe to have migrations executing failing
statements?
Thanks,
- Rowan
--
Morality is usually taught by the immoral.
2008 Sep 28
2
passing variable between methods
How can I pass @member varible from def member to def name and insert it
into name_id? These methods are in the same controller.
def member
@member = params[:member] || ''''
member = @member
end
def name
name_id = @member
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2010 Aug 11
6
rspec2 not working with shoulda
I am using rails edge. I am using gem "rspec-rails", "= 2.0.0.beta.
19" .
I have following code at spec/models/user_spec.rb
require ''spec_helper''
describe User do
it { should validate_presence_of(:email) }
it { should validate_presence_of(:name) }
end
Here is my gemfile
group :development, :test do
gem ''factory_girl_rails'',
2010 Dec 22
8
Shoulda issue: no more "should have_instance_methods" ?
I''m using Shoulda.
After copying the code here....
.... http://joshuaclayton.github.com/code/2009/07/14/should-act-as-list.html....
into my test_helper file so I can test acts_as_list, I came across
issues. For one I realized I had to get rid of the _ between the
"should" and "have" in past cases, but here, I get this error when I
run my unit test:
2011 Nov 24
3
The contrast and Design libraries
Dear all,
I have been using the contrast library in my teaching for the last couple
of years and am right in the middle of this year's round. In the last week
R has been updated to version 2.14.0 on our computers. This has had the
unfortunate effect of meaning the contrasts library no longer works, as
the Design library is no longer available. I wonder if anyone has a fix
for this...or
2009 Jun 07
6
Missing Template when testing with the Brain Buster Captcha partial
When I run my functional tests, they throw an error with the following
message:
ActionView::TemplateError: Missing template /_captcha.erb in view path
app/views:test/vendor/plugins/brain_buster/views/brain_busters
On line #23 of app/views/contacts/_form.html.erb
20: <%= f.label :message %><br />
21: <%= f.text_area :message %>
22:
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)
2011 Jul 28
2
RSpec, shoulda-matchers and Rails model attributes validations
I was trying out RSpec framework in a project and got stopped doing the unit
test of a model. In particular, doing the test for the associations and the
ActiveRecord validations.
I started writing the validations but my tests didn''t look DRY at all.
Before refactoring the tests checked out and look for other people
solutions.
I found out shoulda-matchers and Shoulda (which if I
2010 Jun 15
8
Allow blank on should validate_uniqueness_of
Hello,
Using shoulda, any ideas how to allow blank when having this test:
should validate_uniqueness_of(:email)
Thanks.
--
J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org> (http://pupeno.com)
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to