similar to: How to read rails documentation

Displaying 20 results from an estimated 4000 matches similar to: "How to read rails documentation"

2006 Apr 04
2
loading data with migrations
Hello, I''m just taking a look at migrations, seems like a fantastic way to maintain the database. I am wonder if there is a way to maintain what I''ll call "reference data" along with the migrations. A lot of times in apps your have tables that have pretty static data, often used to generate select lists. Is there a way to insert the reference data into these tables
2006 May 31
7
How do you create a controller & view to create a list of objects?
I''m trying to figure out how to design a view and controller to work with a simple collection. I have a Foo that has many Bars, so here''s what I did: $ ruby script/generate model Foo $ ruby script/generate model Bar (Uncomment t.column, :name: :string in foo and bar migrations) (Edit Foo.rb and Bar.rb, add has_many :bars to Foo, belongs_to :foo to Bar) $ rake db:migrate $ ruby
2006 Apr 03
5
rails migrations - enhanced usage
Hello, When I am writing rails migrations, quite often I make mistake in them which causes the migration tasks to stop halfway with error. This causes lots of problem, because it results in half of the things in migrations changed and other half not. Also, as the schema number is changed, so things cannot be rolled back. Is there any way to make the entire migration action atomic, i.e.,
2006 Apr 01
6
how to use datepicker
This is the webpage: http://projects.exactlyoneturtle.com/date_picker/ I have downloaded and installed it. But how do I use in view page? This is the usual view with ordinary datetime_select: <p><label for="product_date_available">Date available</label><br/> <%= datetime_select ''product'', ''date_available'' %></p>
2006 Jan 14
6
Error installing Rails/FastCGI/Apache2
Trying to install rails/fcgi/apache2. Following these instructions: http://xmlareas.com/ruby-rails-howto.html Using Fedora Core 4. I installed ruby and ruby-devel using apt-get. Everything under Adding FastCGI (optional) works fine up to the gem install fcgi part. Here is what happens: [root@paulbarry fcgi-2.4.0]# gem install fcgi -r -- -with-fcgi-lib=/usr/local/fcgi/lib
2005 Dec 27
4
every table must have an id
Hello, Not sure if this is implied in the documentation or something given: does the RoR framework require "every table must have an id" ? If this is the case, then what happened to the concept of normalization ? Futher, if the tables have already been build for an existing appication ( without ID column in everytable ) , will the script / generate work ? Thanks -- Posted via
2006 Apr 04
8
very bold internet explorer only website
Hello everyone, It is offtopic, but i''m so surprised :| I was looking for some filipino martial arts videos through google video, and came to this link http://redcornerboxing.net/ I use Firefox 1.5 on windows. I never seen *such* bold IE only website in my life. olegf -------------- next part -------------- A non-text attachment was scrubbed... Name: ie_must_die.PNG Type: image/png
2006 Apr 04
2
Pagination and Parent Conditions
Can I do any "fancy" conditionals when using the Pagination helper? The problem is that I want to be able to specify a conditional based on the criteria of a parent object. Here''s an example: Object A has_many Object B''s I want to paginate through 100 B''s but I *only* want it to return the ones who''s A.flag = true I poked around through the Wiki
2004 Jun 21
3
Samba denies access to vaild share
Hello, I'm looking for some help troublshooting why I can't access this share. Everything looks good to me, but smbd does not allow my account in.... Samba 3.0.4 on Debian > [2004/06/21 11:41:35, 2] smbd/service.c:make_connection_snum(311) > user 'LABOR\TIM' (from session setup) not permitted to access this share (ISO) > [2004/06/21 11:41:35, 3]
2011 Jul 13
6
some window files are missing from /.wine
i can't find some of the files and folders what should i do system32/driver/etc is missing
2008 May 21
2
Scaffolding and ActiveRecord in Rails 2
Hi, Is is possible to add this constraint: "null => false" and "limit => 45" like below: create_table :movie do |t| t.string :name, :null => false, :limit => 45 end ...just by using this kind of scaffold command (on Rails 2)? $ ruby script/generate scaffold Movie name:string Thanks, D. -- Posted via http://www.ruby-forum.com/.
2006 Jan 22
23
calculate users age
i know it''s probably really simple, how do i work out someone''s age if i have their d.o.b. stored as a date in my db. cheers -- Posted via http://www.ruby-forum.com/.
2009 Jul 04
3
scaffolding
hi , i used the folllwing command to scaffold, G:\my\webblog>ruby script/generate scaffold webblog id:integer title:string body :text created_at:datetime after when i migrate with the follwing command rake db:migrate i got the error as (in G:/my/webblog) == 1 CreateWebblogs: migrating ================================================ -- create_table(:webblogs) rake aborted! Mysql::Error:
2006 Jun 17
5
STI versus Composition...or the headaches of one big table
Guys, I have a relationship between model classes that I believe is best represented by inheritance, but the likelihood that things will change often is driving us to composition instead. So, I have a class called Autos, and subclasses called Suvs, Minis, Mids, Sports, for example. We have been requested to avoid the STI approach to this, because of fear of a quickly growing table with
2006 Jan 17
2
Does anyone use RedCloth to allow end user input?
I was hoping to use RedCloth for textilize support to allow end users to enter textilized text (In blog comments, for example), but these bugs seem to make RedCloth unsuitable for that purpose: http://rubyforge.org/tracker/index.php?func=detail&aid=2989&group_id=216&atid=891 http://rubyforge.org/tracker/index.php?func=detail&aid=1779&group_id=216&atid=891
2007 May 17
4
How to mock helpers in view specs ?
Hi all, I am mocking the following Rails view (inside a partial): <%= render :partial => "forums/forum", :collection => forum_category.forums.readable_by(current_user? ? current_user : nil) %> My spec fails with the following message: 1) ActionView::TemplateError in ''forum_categories/index (anonymous user) should only render forums accessible to anonymous
2012 Nov 05
9
puppetdb postgresql Connection refused
Greetings, we are trying to setup puppetdb, nut our clients get the following error: Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for lxa7t.unix.lan: Failed to submit ''replace facts'' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Info: Retrieving
2006 Apr 28
2
Accessing fixtures from unit tests
I have set up some fixtures in test/fixtures/users.xml: # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html admin: id: 1 username: admin password: admin pbarry: id: 2 username: pbarry I have a unit test for my user model: require File.dirname(__FILE__) + ''/../test_helper'' class UserTest < Test::Unit::TestCase fixtures :users def
2014 Sep 12
2
[LLVMdev] UBSan detects misaligned memory accesses in llvm-profdata and llvm-cov
Hi! UBSan bootstrap bot fails with error report on 5 llvm-cov and llvm-profdata lit-tests: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/4526/steps/check-llvm%20ubsan/logs/stdio Also see http://llvm.org/bugs/show_bug.cgi?id=20815. The error reports look vaild: in general it's incorrect to load uint64_t, or even structures like "RawHeader" or
2006 Mar 30
9
script/console not working after Rails 1.1 upgrade
Whenever I do script/console I get an error message: Loading development enviroment. c:/ruby/lib/ruby/1.8/irb/init.rb:151: in ''parse_opts'' : undefined method ''upcase'' for nil:NilClass (NoMethodError) from c:/ruby/lib/ruby/1.8/irb/init.rb: in ''setup'' from c:/ruby/lib/ruby/1.8/irb/init.rb:54: in ''start'' from c:/ruby/bin/irb:13