similar to: Importing (bootstrapping) the initial data from fixtures(.yml) with foreign keys in Rails 2.0

Displaying 20 results from an estimated 10000 matches similar to: "Importing (bootstrapping) the initial data from fixtures(.yml) with foreign keys in Rails 2.0"

2008 Jan 23
2
integrate_views is not executing my views
I wanted to use "integrate_views" as Ryan explains in his RailsCast #71 (http://railscasts.com/episodes/71) ...but I can''t get it to work: the view code in not executed I looked everywhere but I can''t understand what I am doing wrong. Here is what I did: I created a new application from scratch (Rails 2.0.2), added rspec and rspec_on_rails plugins, and run
2010 Jun 03
2
creating fixtures for has_many :through
I''m stymied at how to create a fixture that establishes a has_many :through relationship. I''ve watched the railscast at: http://media.railscasts.com/videos/081_fixtures_in_rails_2.mov ... but that''s for HABTM relationships. I''ve read: http://www.ruby-forum.com/topic/145676 but that ultimately doesn''t answer any question. So with no further ado:
2006 Feb 21
0
How do you order fixtures within each yml file?
Hi. I''ve come across the following documentation: Note that YAML fixtures are unordered. If you want ordered fixtures, use the omap YAML type. See yaml.org/type/omap.html for the specification. You will need ordered fixtures when you have foreign key constraints on keys in the same table. This is commonly needed for tree structures. Example: --- !omap - parent: id:
2007 Oct 17
2
Complex Forms (From Railscasts.com)
Hi, I have been watching the last three episodes on railscasts.com in which he goes through dealing with multiple models in one for using fields_for, and virtual attributes. (http://railscasts.com/episodes/ 73). Here is an example of the way they suggest to go about it: # projects_controller.rb def new @project = Project.new 3.times { @project.tasks.build } end def create @project =
2006 Jun 12
0
Maintain foreign key linkages in fixtures...
Is there anyway to refer to the entities being linked in a foreign key field of a fixture by name instead of id? Ie, if I have categories.yml some_cat: id: 1 name: Foo other_cat: id: 2 name: Bar data.yml some_item: id: 1 category_id: <%= categories(:some_cat).id %> name: Hello World The above doesn''t work due to scope, even if the fixtures are loaded in the proper
2012 Mar 27
0
Offline apps and Asset pipeline Problem in rails3.2
I have a question about using rack-offline with asset pipeline in rails3.2.2. rack-offline creates application.manifest for local caching. This gem watches file modification then re-generate hash-key in manifest. I confuse offline apps with asset pipeline. asset pipeline provides variable paths file to assets/foo.js (actually app/assets/javascript/foo.js). I use `config.assets.debug = false`
2012 Oct 19
1
Globalize3 gem, upload data from CSV
Rails 3.1.3 Globalize3 latest I am not sure if I can ask this question here in general Rails forum. But I''ll try. Currently I am using a gem, Globalize3, which is useful for model I18n. https://github.com/svenfuchs/globalize3 Say, I have a model City, having only one column, name. City names appear differently depending on the language, so perhaps this particular gem is useful.
2007 Jul 21
0
Mocha featured on Railscasts
Cool. Thanks for letting me know. On 21 Jul 2007, at 09:20, Chris O''Sullivan wrote: > Heya James, > > I thought you''d like to know that Mocha featured in the latest > Railscasts. > > Check it out here: http://railscasts.com/episodes/60 > > -Chris >
2010 Mar 31
5
undefined method `each' for "":String
I implemented creating an object within another object according to this Railscast: http://railscasts.com/episodes/74-complex-forms-part-2 but I''m getting this error after I submit. Any ideas? undefined method `each'' for "":String -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2010 Jul 18
0
password_confirmation
In Railscasts episode regarding "Authlogic" http://railscasts.com/episodes/160-authlogic, at 5:39, it adds a password confirmation field, and calls it :password_confirmation Is :password_confirmation part of the Authlogic or can be used originally with Rails? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google
2010 Dec 25
1
Advanced search without database
Hello guys, Im trying to make an advanced search form, actually i did like Ryan Bates teaches in this railscast : http://railscasts.com/episodes/111-advanced-search-form But my problem is that i dont want to save the searches in my database and i dont know how to do this... In the railscast, there was a comment like this: *14. Karl <http://www.vbsfinder.com/> May 26, 2008 at 23:01 *
2011 Aug 04
1
Creating form for associated has_many model
This example shows how to create a form for an associated model ''Comment'', where ''Comment'' belongs_to ''Post'' and ''Post has_many ''Comments''. http://edgeguides.rubyonrails.org/getting_started.html#generating-a-controller How might I modify that to display all the comments in the form, and still have it call the
2011 Dec 20
4
Custom Devise Controller
Hi Guys, I was wondering if sb could help me. I have the following problem: -I want to create a complex form using railscast tutorial ( http://railscasts.com/episodes/73-complex-forms-part-1). Well, to perform this I need to update my controller(in this case the controller responsible to manipulate user). But I''m using Devise gem and I don''t know how I could manipulate the
2008 Sep 02
2
Needing a (better) Selenium Testing Tutorial
Hi everybody, it''s time to begin testing stage on the application we are doing. I''ve seen RailsCast episode about the subject (http://railscasts.com/ episodes/116) which is actually very instructive, but I want to know if there are out there any compliment tutorial or doc to dig deeper. A lot of peace and thanks for your assistance. Paco
2010 Nov 14
5
Authlogic and rails 3 : NameError in User sessionsController#new
Hi everybody, I''ve installed Authlogic on Rails 3 following the Railscast (http:// railscasts.com/episodes/160-authlogic), and the resources I was able to find on the web, but I''m facing a problem. Once I''ve generated the user_sessions controller and mapped the login and logout routes, I get an error if I try to load the login page : uninitialized constant
2012 Sep 21
9
Using PostgreSQL with RoR on windows. Help!
So I just got involved in a huge team project with RoR and PostgreSQL. But I can''t find anywhere on the internet to find a proper way to put them together. I did find one but it is for iOS :-/ http://railscasts.com/episodes/342-migrating-to-postgresql?view=asciicast I have them both installed and the gem package for postgres also. the database.yml is already configured. I just
2009 May 08
1
filter_parameter_logging for multi model forms
Hi all, I have a multi model form setup in the classic Ryan Bates Complex forms style (railscasts.com/episodes/73) for my signup page. The two models in this are the Account model and the User model and this structure cannot be changed right now. The User model has password and password_conf attributes which are, unfortunately, taken alongwith the rest of the User''s attributes into an
2011 Jun 03
0
Rack Middleware support for Rails 2.0.2? If not what is the alternative to implement similar functionality in Rails 2.0.2..
Hello all, I am using Rails 2.0.2 and Ruby 1.8.7 and I need to make use of rack middleware for integrating an ajax file upload plugin(https:// github.com/valums/file-uploader) with paperclip in Rails( As given in this tutorial:- http://mooooooooooo.wordpress.com/2010/12/03/paperclip-valums%E2%80%99s-file-uploader-and-middleware-continued/). I have referred to the rack-middleware Railscast by
2008 May 02
1
names of select elements inside a fields_for block not generated as expected
Hey All, I''m trying to play along w/the ''complex forms 1'' railscast (http://railscasts.com/episodes/73) and having trouble. The view is projects/new. I''m trying to add some project_people to the form w/code like so: <% form_for(@project) do |f| %> [project stuff here] <% for pp in @project.project_person %> <% fields_for
2009 Oct 06
0
Named routes and a Railscast
I''m looking at railscast#102 ( http://railscasts.com/episodes/102-auto-complete-association ) and when I implement it, a certain named ( "formatted_channelnotes_path(:js)" ) route is used in: <%= text_field_with_auto_complete :channel, :channelnote_name, { :size => 15 }, { :url => formatted_channelnotes_path(:js), :method => :get, :param_name =>