search for: d6veteran

Displaying 20 results from an estimated 21 matches for "d6veteran".

2006 Apr 04
2
Syntax Error in find()
Maybe I misunderstand the parameterization of find(), I am getting this syntax error for <% @choices = Choic e.find(:all, :conditions => "question_id" = question.id, :order => "order") %> ---- ERROR LOG ---- ActionView::TemplateError (compile error ../config/../app/views/admin/test/show.rhtml:37: syntax error _erbout.concat " "; @choices =
2006 Mar 31
5
Changing Table Schema and Models
If I make a change to a database table, how do I recreate the model to reflect the change? -- Posted via http://www.ruby-forum.com/.
2006 Mar 31
18
Modelling Foreign Keys
Can someone point me to a reference or tutorial that shows how to map foreign key relationships in the model? For example given: Users id name email Posts id user_id title How do I associate user_id with users.id in the Post and User models? has_many and belongs_to don''t seem to do it. -- Posted via http://www.ruby-forum.com/.
2006 Mar 30
4
404 Error on dispatch.fcgi
I''m a java/php programmer trying out Ruby/Rails on my Dreamhost account. I followed the wiki steps to the letter (2x now) and am still getting a 404 when I hit my dispatch.fcgi. http://mydomain.com/public/dispatch.fgci Can someone give me suggestions on how to debug this problem? Here is my dispatch.fcgi file: #!/usr/bin/env ruby # # You may specify the path to the FastCGI crash log
2006 Apr 04
1
Redirecting after "new" action
How do I alter the "new" action so that it returns to a page of my specification (vs. returning to "list")? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Mar 31
3
Why use a Subdomain?
New to Ruby on Rails. I''ve been playing around with an application I set up at rails.foo.com. Basically this means that all my pages tied to the application live on that subdomain. Is there any reason for not just installing onto your parent domain foo.com and putting your static pages in the public dir that ruby on rails creates? The answer seems like a simple yes, however all the
2006 Mar 31
3
ID fields not getting picked up
For example I have table Questions. With fields id, text, and test_id. test_id is not being displayed in my view. I am hoping this means Rails has picked up that it is an id for another model. If so, then how do I utilize that? If not, then do I need to avoid ''id'' in any field names other than the main id field? Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Mar 30
2
database.yml and Dreamhost
I am unable to connect to my databases. Here is the error I am getting: MysqlError (Can''t connect to local MySQL server through socket ''/var/run/mysqld/mysqld.sock'' (2)): Here is my database.yml: # MySQL (default setup). Versions 4.1 and 5.0 are recommended. # # Get the fast C bindings: # gem install mysql # (on OS X: gem install mysql --
2006 Apr 04
0
Redirecting after adding new object
The default behavior after completing the action "new" is to take the user back to the object "list" view. Given: Question (has many answers) Answer (belongs to question) After creating a new Answer I want to the page directed back to the show view of the Question object to which this new Answer belongs. How do I do that? Thanks? -- Posted via
2006 Apr 04
0
Intercepting scaffold functions
Two things: 1) I want to control where the view returns to after creating a new object. Currently it directs to the list action of the model''s controller. 2) Where do I edit the js that produces the green ''objected created'' text that is used in the scaffold default new action? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 04
0
Customized buttons for button_to()?
I wanted to use custom buttons, is there a way I can specify those? -- Posted via http://www.ruby-forum.com/.
2006 Apr 05
2
Typo on Dreamhost
I''ve had no success getting Typo running on my Dreamhost account. Does anyone have a link to an FAQ on getting Typo up on Dreamhost? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 07
0
Redirecting after "create" action
I have several objects that I want to redirect back to my controller ''foo'' action ''list'' after the ''create'' action is completed. So the nav would go: foo/list > foobar/new > foobar/create (redirects to) foo/list the default behavior is to take the user to the list view for that specific object. I want to intercept that and take them
2006 Apr 10
1
Error When Sorting
Got a bug I cannot eliminate. My ajax style sorting looks cool but the position change is never updated. The error (at bottom points to line 52 in my controller and I have indicated that line). #view <!-- Question Data --> <h2>Test Questions</h2> <div id="list_questions"> <%= render(:partial => "list_questions") %> </div>
2006 Apr 15
2
Using a Button to render partial
Is there a way to render a partial using a button? Basically in a content div I want the user to launch a new sub content item in the same div by clicking a button. Any help appreciated. Loving rails more and more everyday. -- Posted via http://www.ruby-forum.com/.
2006 Apr 16
2
AJAX effect when inserting new div
Can some one point me in the right direction? I''ve got several pages that will respond to user input by creating a new div in the content area. I want that new div to visually expand into view or flash with a background color rather than just appear. Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 17
2
Building Dynamic DOM Element IDs for RJS Templates
My element IDs are constructed using the object id. So . . . <div id="foo<%= foo.id %>" > <p><%= link_to_remote "Do Foo", :url =>{:action => "do", :id => foo.id} %> </div> How do, and can I, build that id in the RJS template? Also, can anyone recommend a good Ruby syntax book that would help me out with Rails? I know
2006 Apr 19
3
Custom Form Buttons
Is there a way to deliver options for a custom form button to the submit function? As in: <input type="image" name="submit" src="image.jpg" width="126" height="18"> -- Posted via http://www.ruby-forum.com/.
2006 Apr 05
4
Development Mode on Dreamhost
Anyone know (or know where to point me to) to figure out how to force Rails into development mode? I''d like to not have to kill dispatch.fcgi everytime I make a change. My site is not live and I''m just doing development and testing right now. Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 07
6
Magic Field Names - "position"
What does the Magic Field Name position do? I was looking here: http://wiki.rubyonrails.com/rails/pages/MagicFieldNames And unfortunately that documentation is incomplete. Thanks. -- Posted via http://www.ruby-forum.com/.