[Rails] Re: Multiple Models in one form

2010-05-08 Thread Joe Smith
slindsey3000 slindsey3...@gmail.com wrote in message news:ac0ebe39-e6e3-48df-8ed9-9b4ab029c...@h11g2000vbo.googlegroups.com... I have had the worst time getting my forms to accept input for more than one model. I tried using accepts_nested, and other techniques and finally got it all

[Rails] Re: Using self. Can you newbify this for me?

2010-05-06 Thread Joe Smith
Joshua Martin wrote: Also, you should put return li at the end; you don't have to, but it just makes the code easier to read. Oddly most ruby style guides I've seen disagree with this. They recommend using return only if one is returning from the middle of the function. -- You received

[Rails] Re: How many connection pool should we have for internet facing apps?

2010-04-30 Thread Joe Smith
Frederick Cheung wrote: On Apr 29, 1:57 am, Joshua Partogi joshua.part...-re5jqeeqqe8avxtiumw...@public.gmane.org wrote: Hi all, This is a rather basic question about connection pooling in ruby on rails. In rails we can define the connection pool in database.yml. I assume it is quite safe to

[Rails] Re: Translated (language-aware) routes in Rails application

2010-04-28 Thread Joe Smith
Paweł K komr...@gmail.com wrote in message news:9ced3922-bdfa-40f2-b5a8-0bf1e6518...@k33g2000yqc.googlegroups.com... So there's no way to achieve this effect without plugin? Like scope or namespace? Not really. I mean, if manually work work for you, other than the number of lines, why don't

[Rails] Re: About your application's environment URL not found

2010-04-25 Thread Joe Smith
command0 justinbrinkerh...@gmail.com wrote in message news:416bec30-fc32-4cf6-a20a-3f67e4d2f...@s22g2000prd.googlegroups.com... Then run your preferred editor, and create a new file in /etc/apache2/sites-enabled I think you mean creat a new file in /etc/apache2/sites-available since

[Rails] Re: to nest or not to nest: RESTful style

2010-04-25 Thread Joe Smith
Fearless Fool li...@ruby-forum.com wrote in message news:87f41f7fcd6d2f7d85de9eb875505...@ruby-forum.com... In our world: There are many landlords. Landlords have many buildings. Buildings have many tenants. One way to structure the routes would be: /landlords/:landlord_id

[Rails] Re: css RoutingError with 3.0.0.beta3

2010-04-25 Thread Joe Smith
lgs luca.so...@gmail.com wrote in message news:f40aaef6-8e69-49bd-91f6-dd5865cf5...@t36g2000yqt.googlegroups.com... To have a shot at 3.0.0.beta3, I had just been trying rails g scaffold welcome , then it come up I get a routing error to css which will never display : Started GET /welcomes

[Rails] Re: to nest or not to nest: RESTful style

2010-04-25 Thread Joe Smith
Fearless Fool wrote: ... which happens to generate an identical map. But Joe's mapping syntax much more concise, and his explanation is great. I can't take full credit for the syntax. I found it in the Rails Routing from the Outside In guide [1] when double checking the syntax for shallow

[Rails] Re: content displaying below posts in [ ]

2010-04-21 Thread Joe Smith
Michael Michael li...@ruby-forum.com wrote in message news:fce2a0ce9e610603f85b4cff455f6...@ruby-forum.com... I think i found the problem I had %= @posts.each do |post| % instead of % @posts.each do |post| % I just realized that, because having %= outputs right? Yep, that sure sounds

[Rails] Re: How to replace mail_to in Rails 3?

2010-04-15 Thread Joe Smith
Paul Jonathan Thompson rails...@gmail.com wrote in message news:h2p603755611004142229h2d4f7013pde4320967c722...@mail.gmail.com... I have just started up grading to Rails 3. mail_to no longer works, you just get a lot of garbage. With what do I replace it? The mail_to helper is still

[Rails] Re: Some error while installing RedMine no idea what it is

2010-04-15 Thread Joe Smith
abcd-cards mightydre...@gmail.com wrote in message news:c4198725-6254-4602-91c2-1dd3065a1...@i25g2000yqm.googlegroups.com... I am using a Debian Lenny system. I did the following to install RedMine as mentioned on their wiki page http://www.redmine.org/wiki/redmine/RedmineInstall ruby 1.8.7

[Rails] Re: want to implement authetication of user id and password for my cms

2010-04-09 Thread Joe Smith
Rahul Mehta rahul23134...@gmail.com wrote in message news:e6ba387a-b6cd-4ec0-9dff-77e634043...@v20g2000yqv.googlegroups.com... any good script or plugin to implement user id and password authentication . Sure. RESTful_authenication has been pretty popular for a while, but now the most

[Rails] Re: Call Action on button Click

2010-04-08 Thread Joe Smith
Ashwin Vel velapa...@gmail.com wrote in message news:c6eb2f16-e025-4d7c-b3ef-8a5e57fd9...@c36g2000yqm.googlegroups.com... Very simple question. How do i have just a simple button without a form , which calls an action on Click. I think you want button_to, which works pretty much just like

[Rails] Re: Overwriting modifiers methods with Rails

2010-04-08 Thread Joe Smith
:Frederick Cheung: Couldn't see any trace in the source of write attribute being marked as deprecated. It (ActiveRecord::Base#write_attribute) is not just deperecated, it is gone. But another method with the same name in a different class (ActiveRecord::AttributeMethods#write_attribute)

[Rails] Re: Country - (State) - City/Town (XML/JSON)

2010-04-08 Thread Joe Smith
Ants Pants antsmailingl...@gmail.com wrote in message news:v2pc1f9ecae1004071202t245eb8cbgd08ffb44c1dca...@mail.gmail.com... Does anyone know where I can find Country - (State) - City/Town data in easy to read format (XML/JSON)? There is a databse that provides city (and state/province

[Rails] Re: Rails model design visualization

2010-04-02 Thread Joe Smith
Dudebot craign...@gmail.com wrote in message news:f2c00b23-cb4a-4b09-9325-d2c64c3a4...@w17g2000yqj.googlegroups.com... I'm a fairly visual person, and I have a piece of paper with many boxes and arrows with labels like has many and belongs to for my database models. It's messy, but it works.

[Rails] Re: Superclass mismatch with Rails 3

2010-04-01 Thread Joe Smith
Phil Ostler li...@ruby-forum.com wrote in message news:7e3f1c8e83517d604d3d7ab7545ff...@ruby-forum.com... I'm currently developing a Rails 2 project that I'd like to migrate across to Rail 3. However I'm having real trouble in the first place getting Rails 3 to work straight out of the box

[Rails] ActiveRecord's design allowing silent failure of object saves in associations.

2010-03-31 Thread Joe Smith
I take issue with the faxt that in some cases ActiveRecord may automatically save records using save rather than save!. Specifically, this is when assigning an object to a has_one relation, or adding an object to the collection vreated by the remaining has_* associations. The automatic saving

[Rails] controller logic not working

2008-11-29 Thread Joe Smith
So I've written this code in my controller and it doesn't seem to process my records and I don't know why. error = nil @my_cart = @user.shopping_cart @my_cart_items = @user.shopping_cart.shopping_cart_items for shopping_cart_item in @my_cart_items if @quantity 0 do stuff end

[Rails] Developing code that can go multiple places

2008-11-29 Thread Joe Smith
In my controller code, depending on the values in the database, I may want my user to go one of several places. But when I put more than one redirect in, it gives me the message: Render and/or redirect were called multiple times in this action. How do I do this? -- Posted via

[Rails] retrieving order quantity from form

2008-11-28 Thread Joe Smith
I have a shopping cart screen where I display my available item and all it's description info and then want to have the user enter a quantity. I show all my item fields, e.g. %= @item.item_id % Then I have a field defined %= text_field 'shopping_cart_item' , 'quantity' % In my controller,

[Rails] Re: retrieving order quantity from form

2008-11-28 Thread Joe Smith
So i changed my view to include % text_field_tag 'quantity' % and I changed my controller's first line to say quantityordered = params[:quantity] Is this correct? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Re: retrieving order quantity from form

2008-11-28 Thread Joe Smith
It seems to 'work' (doesn't abort), but when I store it in my database I have a null value -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

[Rails] Re: You have a nil object when you didn't expect it!

2008-11-27 Thread Joe Smith
I got it working, thanks for your help -- Posted via http://www.ruby-forum.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

[Rails] Re: You have a nil object when you didn't expect it!

2008-11-26 Thread Joe Smith
Thanks Philip. I'm new here, can you advise on what I need to do prior to get @shopping_cart set? I'm not sure of the exact steps involved in accessing the data in ROR. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: You have a nil object when you didn't expect it!

2008-11-26 Thread Joe Smith
So I made a change and now I have: NameError in Shoppingcart#my_shopping_cart Showing app/views/shoppingcart/my_shopping_cart.rhtml where line #33 raised: undefined local variable or method `shopping_cart_item' for Shopping_cart:Class Not sure where to go from here. -- Posted via

[Rails] Re: You have a nil object when you didn't expect it!

2008-11-26 Thread Joe Smith
Here's what I now have, not sure where to go from here: NameError in Shoppingcart#my_shopping_cart Showing app/views/shoppingcart/my_shopping_cart.rhtml where line #24 raised: undefined local variable or method `shopping_cart_item' for Shopping_cart:Class Extracted source (around line #24):

[Rails] Re: You have a nil object when you didn't expect it!

2008-11-26 Thread Joe Smith
class Shopping_cart ActiveRecord::Base belongs_to :owner, :class_name = user, :foreign_key = owner_id has_many :shopping_cart_items, :class_name = shopping_cart_item, :finder_sql = select ti.* from shopping_cart_items ti, shopping_carts t where ti.owner_id =

[Rails] Re: You have a nil object when you didn't expect it!

2008-11-26 Thread Joe Smith
Daniel, thank you so much, now I have the message NameError in Shoppingcart#my_shopping_cart Showing app/views/shoppingcart/my_shopping_cart.rhtml where line #25 raised: uninitialized constant Shopping_cart::ShoppingCartItems Extracted source (around line #25): 23: % if @my_cart 24: 25: