[Rails] Re: Restful create URL

2010-03-22 Thread DmitryPush
As you now URL its a GET method, but according RESTful rules create it's a POST method. Rails defines seven controller methods for RESTful resources by convention. They are: Action HTTP Method Purpose - indexGET

[Rails] Java script errrrror in rails

2010-03-22 Thread Tony Augustine
when i click a button called add it shouldshow a javascript form showing an uploadfeature.its not displaying anything.instead of tht its only showing the mwssage lik tis in console. please providee a solution ActionView::TemplateError (Called id for nil, which would mistakenly b

[Rails] Adding items in groups in Rails

2010-03-22 Thread Railsquestion Zz
My product table is idtype price location 1 chips $3 aisle3 I have a question with adding the products in groups. There is a quantity field(nonmodel) where the user can enter the quantity While adding a new product if the user enters: type: soda quant

[Rails] Re: UnitTesting-Action view testcase is failed

2010-03-22 Thread Periyasamy Ramachandiran
Hi Fred, Just i downgrade the rails version from 2.3.5 to 2.3.2. Now this issue is fixed.?. Any idea why when i use the higher version rails the problem is occured? Regards, Periyasamy. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Newbie needing help on some tricky associations

2010-03-22 Thread Andy
Hello, I'm stuck on some associations that I think may be more complex than I originally anticipated. Not really straightforward stuff for my first Rails app so if you have a chance to point me in the right direction I would really appreciate it!! I have PurchaseItems, RecipeItems, and MenuItems.

[Rails] Re: UnitTesting-Action view testcase is failed

2010-03-22 Thread Periyasamy Ramachandiran
Okay i will mention the Model and class name details as below, My model name is "test_instance.rb" and class name is "TestInstance". My Unit test file name is "test_instance_test.rb" and the class name is "TestInstanceTest". When i run the unit test i am getting the error as below in "ActionVi

[Rails] need to parse a User uploaded file, but don't care if it's saved

2010-03-22 Thread GoodGets
parsing the file's not the problem, just not sure what to do with it before or after. I was thinking about uploading the files using Paperclip, parsing it, then deleting itfrom the database. But, that all seems a little unnecessary, especially if I don't care if they are even saved. I then thoug

[Rails] Question on insert to multiple tables?

2010-03-22 Thread Carlos Mena
Hello, every day i love more rails xD because after struggling a bit I could finally install the Active Scaffold plugin and it works great with this. But now it is time to grow a little more on rails and am trying to make an ordering system and products. Which on my system I have these 3 tables:

[Rails] NoMethodError in AdminController#index

2010-03-22 Thread dwhitekiss
I am newb in ror. I've googled and found no concrete answer to my problem below: NoMethodError in AdminController#index undefined method `scaffold' for AdminController:Class RAILS_ROOT: /home/darwin/Sites/music_library Application Trace | Framework Trace | Full Trace /home/darwin/Sites/music_l

[Rails] Re: how to customize logger messages in rails 2.3.5

2010-03-22 Thread Tom Mac
Hi > You can overload call method from Formatter. > > example: > > class Logger >class Formatter > Format = "%s [%s] %s %sn" > def call(severity, time, progname, msg) > Format % [severity, format_datetime(time), progname, msg] > end >end > end > > $LOG.error('This is m

[Rails] Displaying a nested field as a label

2010-03-22 Thread andrew
There is what I'm doing: I want to display a series of text_area fields (read only) of which each has a checkbox. Is this the best way to do it? <% form_for (@section), :url =>{:action => "save_comments"} do |f| %> <% f.fields_for :comments do |a|%> <%= a.text_area :tex

Re: [Rails] Still Using old Rails even after Upgrade

2010-03-22 Thread Conrad Taylor
On Mon, Mar 22, 2010 at 5:30 PM, jackster the jackle wrote: > I was recently forced to upgrade to Rails 2.3.5 because of a problem > with gem. > After doing so, I'm trying to create a new site and I noticed that I am > getting warnings for depricated commands and it looks like I'm running > on my

[Rails] Setting custom encoding for a single request?

2010-03-22 Thread Donncha ..
Hi all, I was wondering if it's possible to set Rails's output encoding for a single request w/ Ruby 1.9? For example, one request on my app generates a form for submission to a third-party who mandates ISO-8859-1, and the form therefore contains iso-8859-1 encoded strings. Although I set the re

Re: [Rails] Re: Re: Default pricing and custom client pricing

2010-03-22 Thread Craig White
On Tue, 2010-03-23 at 03:28 +0100, Tony Tony wrote: > Craig White wrote: > > yes, you misunderstood... sorry if I wasn't clear enough. Something like > > this, definitely not tested and perhaps you can get it down to a single > > query. > > > > Class Pricing > > has_one :customer > > belongs_to :i

[Rails] Restful create URL

2010-03-22 Thread sgallo1
I'm creating and api. I create a scaffold script/generate scaffold user I have users controller, but how do I call the create method via a URL ie...localhost:3000/users/create.xml?params new doesn't work as it returns the empty user object in XML as it should, but when I call create localhost:3

[Rails] Re: Re: Default pricing and custom client pricing

2010-03-22 Thread Tony Tony
Craig White wrote: > yes, you misunderstood... sorry if I wasn't clear enough. Something like > this, definitely not tested and perhaps you can get it down to a single > query. > > Class Pricing > has_one :customer > belongs_to :item > > id > price > customer_id > > def self.item_price(item, cus

Re: [Rails] Re: Default pricing and custom client pricing

2010-03-22 Thread Craig White
On Tue, 2010-03-23 at 03:02 +0100, Tony Tony wrote: > Craig White wrote: > > > I would have a table called pricing and have a column that had the > > customer_id and thus you might have 2 (or more) prices for an item but > > only one for a specific customer or default to the one that is not tied >

Re: [Rails] Re: Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 6:57 PM, Mike Montagne wrote: > Great. Doesn't answer the question; doesn't show how to declare native > field types in the up method; and yet you've already answered my > question. Dude, you really aren't listening. You've been given multiple pointers to the page that ha

Re: [Rails] Still Using old Rails even after Upgrade

2010-03-22 Thread Jeffrey L. Taylor
Quoting jackster the jackle : > I was recently forced to upgrade to Rails 2.3.5 because of a problem > with gem. > After doing so, I'm trying to create a new site and I noticed that I am > getting warnings for depricated commands and it looks like I'm running > on my old Rails version 1.2.3? > Ha

[Rails] Re: Default pricing and custom client pricing

2010-03-22 Thread Tony Tony
Craig White wrote: > I would have a table called pricing and have a column that had the > customer_id and thus you might have 2 (or more) prices for an item but > only one for a specific customer or default to the one that is not tied > to a specific customer. Hi Craig! I don't think this would

[Rails] Re: Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Michael Pavling wrote: > Okay I'm done with your posts now... but I hate to be called a > liar, so I'll respond to this one: > > On 23 March 2010 01:18, Mike Montagne wrote: >> There's no cleaner method. Nor the provided example. This is just >> handling the same incoherent field types. > >

[Rails] Re: Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Hassan Schroeder wrote: > On Mon, Mar 22, 2010 at 5:56 PM, Mike Montagne > wrote: > >> I've had that page opened for days and I don't see any such example. > > It's not on that page, I just created it for you in *ONE MINUTE* based > on the content of the page I keep mentioning. Well, that isn'

Re: [Rails] Default pricing and custom client pricing

2010-03-22 Thread Craig White
On Mon, 2010-03-22 at 17:52 +0100, Tony Tony wrote: > Hi all, > > I have a personal project I'm planning and I came to a small hurdle. > > I want to have an item with a price that will be the default for all > clients/users. However, in my business I have some clients that are > grandfathered in

Re: [Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Michael Pavling
Okay I'm done with your posts now... but I hate to be called a liar, so I'll respond to this one: On 23 March 2010 01:18, Mike Montagne wrote: > There's no cleaner method. Nor the provided example. This is just > handling the same incoherent field types. In the link I pasted for you to it sa

Re: [Rails] Re: Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Craig White
On Tue, 2010-03-23 at 02:31 +0100, Mike Montagne wrote: > Michael Pavling wrote: > > On 23 March 2010 00:56, Mike Montagne wrote: > > > > NO!! :-) Migrations are a million times better! > > Well, Michael, I hate to tell you... back to square one: Obviously, > *we're doing migrations*, and it wa

[Rails] Re: Default pricing and custom client pricing

2010-03-22 Thread Tony Tony
Anybody have ideas, thoughts or suggestions? -Tony -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from t

Re: [Rails] Re: Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 6:31 PM, Mike Montagne wrote: > No example of SQL in a migration has been cited yet. It is on the ActiveRecord::Migration page. As I've said. Repeatedly. disframed: and preceded by the sentence: "And some

[Rails] Re: Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Michael Pavling wrote: > On 23 March 2010 00:56, Mike Montagne wrote: > > NO!! :-) Migrations are a million times better! Well, Michael, I hate to tell you... back to square one: Obviously, *we're doing migrations*, and it was the inability to construct all the field types which obviously matt

[Rails] Re: Still Using old Rails even after Upgrade

2010-03-22 Thread jackster the jackle
When I try to start Webrick, it is still trying to load the old path: ./script/server ./script/../config/boot.rb:26:Warning: Gem::SourceIndex#search support for String patterns is deprecated, use #find_name /usr/local/ruby-1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_origin

[Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Michael Pavling wrote: > On 23 March 2010 00:21, Mike Montagne wrote: >> That's a far cry from handling all the field types, isn't it? > > Hasn't it already been pointed out that out of the box, Rails handles > "basic" field types. If you *really* have to do something that isn't > supported out o

Re: [Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Michael Pavling
On 23 March 2010 00:56, Mike Montagne wrote: > After all, I suppose I could remove the up and down code, manage my > tables with generic tools (even the command line), and be done with it. You know what... that's exactly what I did for my first Rails app :-) I figured I had so much going on learn

Re: [Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 5:56 PM, Mike Montagne wrote: > I've had that page opened for days and I don't see any such example. It's not on that page, I just created it for you in *ONE MINUTE* based on the content of the page I keep mentioning. > Anyway, it looks to me like you're creating the tab

Re: [Rails] Still Using old Rails even after Upgrade

2010-03-22 Thread Michael Pavling
On 23 March 2010 00:30, jackster the jackle wrote: > Can anyone help me fix this so I am running on the newer version? Uninstall the old version? If it's not there, it can't run! sudo gem remove rails -v1.2.3 You might find though that the problems are caused by using different use accounts wh

[Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Hassan Schroeder wrote: > On Mon, Mar 22, 2010 at 5:21 PM, Mike Montagne > wrote: > > > Who's making it a "spitting match"? I do know, and it's in the document > I *already pointed you at* -- the ActiveRecord::Migration API. > > Simple example: > > class CreateDogs < ActiveRecord::Migration >

[Rails] Namespaces that are controllers?

2010-03-22 Thread Michael L. Artz
I'm checking out the new router in Rails 3, and was looking to create an '/admin' section of a website with several namespaced resources, however I'd like the top level '/admin' to also route to a controller. Here's my current setup: match 'admin' => 'admin#index', :as => 'admin' namespace :admin

Re: [Rails] Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Michael Pavling
On 23 March 2010 00:21, Mike Montagne wrote: > That's a far cry from handling all the field types, isn't it? Hasn't it already been pointed out that out of the box, Rails handles "basic" field types. If you *really* have to do something that isn't supported out of the box, then run your own SQL -

Re: [Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 5:26 PM, Mike Montagne wrote: > You're the first I've heard of who is unconcerned with *redundantly* > upscaling data storage resources on a scale of 255/2, ostensibly to > support an application on different engines, when all you'd have to do > to do so properly would be

Re: [Rails] Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 5:21 PM, Mike Montagne wrote: > It's your assumption that I'm not studying the API documentation. Just from the fact that you seemed in doubt whether you could use raw SQL in a migration; the doc has an example of doing just that. > You know how to implement that to prod

[Rails] Still Using old Rails even after Upgrade

2010-03-22 Thread jackster the jackle
I was recently forced to upgrade to Rails 2.3.5 because of a problem with gem. After doing so, I'm trying to create a new site and I noticed that I am getting warnings for depricated commands and it looks like I'm running on my old Rails version 1.2.3? Can anyone help me fix this so I am running o

[Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Hassan Schroeder wrote: > On Mon, Mar 22, 2010 at 4:58 PM, Mike Montagne > wrote: > > I'm not talking about "merging tables", I'm talking about running the > app > on different DBs. > > That's simply incompatible with your examples, and is why abstraction > of DB characteristics is a good thi

[Rails] Re: How to debug and profile rails library code ( in windows )

2010-03-22 Thread Luke Pearce
Keeping it simple - you could just rename the one in your ruby bin directory or uninstall the mongrel gem! :) -- 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 t

[Rails] Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Hassan Schroeder wrote: > On Mon, Mar 22, 2010 at 4:03 PM, Mike Montagne > wrote: > > I have to wonder why you haven't > (apparently) read the API doc for ActiveRecord::Migration. > > FWIW, > -- > Hassan Schroeder hassan.schroe...@gmail.com > twitter: @hassan It's your

Re: [Rails] Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 4:58 PM, Mike Montagne wrote: > Of course, you recognize the importance then -- "premature optimization" > is not about accounting for your issues to the depth of the first 253 > bytes... half a dozen columns of half a dozen tables -- some of which > may contain up to doze

[Rails] Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Hassan Schroeder wrote: > On Mon, Mar 22, 2010 at 4:03 PM, Mike Montagne > wrote: > >> So the question remains, how do you support migration of these vital >> field types? > > They are apparently vital to you; do not assume that's true of every > developer and every situation. > > Yes, you can

[Rails] Re: Deploying my rails app to GoDaddy

2010-03-22 Thread Robert Walker
Butterson wrote: > I'd appreciate all the help and advice I can get. Thanks. My advice for your future projects would be to discuss deployment issues with your client a lot earlier in the development cycle. I'd push this discussion to the first conversation with the client if it were me. A less

[Rails] Re: How to send back a response to an Ajax.request call

2010-03-22 Thread Mc Ieong
Frederick Cheung wrote: > On Mar 22, 3:05�pm, Mc Ieong wrote: >> � � � � onFailure: function(){ >> � � � � � alert('Something went wrong...') >> � � � � � } >> � � � � }); >> >> The action did get called but the above code always go to "onFailure" >> part, doesn't anyone konw how the action "check

Re: [Rails] Re: Issues RUNNING mysql gem

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 4:03 PM, Mike Montagne wrote: > So the question remains, how do you support migration of these vital > field types? They are apparently vital to you; do not assume that's true of every developer and every situation. Yes, you can use your own custom SQL in a migration. If

[Rails] ActiveMerchant, Authorize.net and Email Receipts

2010-03-22 Thread aawilson
I've posted this on RailsForum.com and in the ActiveMerchant talk group, and haven't received an answer, so I figure I'll try here. Hello. I've been searching for information on this for a while, but my google fu is evidently weak--hardly anyone even talks about email receipts re: ActiveMerchant,

[Rails] Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
E. Litwin wrote: > As others have posted, modify your migration file before running it if > you are concerned about the size of varchars. > > For example, you can do the following, > > def self.up > create_table :mytable, :force => true do |t| > t.string :field_name, :null => false, :limit

[Rails] Re: How to reference a select_tag within a form

2010-03-22 Thread Frederick Cheung
On Mar 22, 9:18 pm, RichardOnRails wrote: > It brought up a list of vendor-names immediately under my Vendors > textbox, which worked great as far as I was concerned.  Then I tried > to turn it into a real drop-down: > 1.  I added style="display:none" to the div so that the drop-down was > hidde

[Rails] Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
E. Litwin wrote: > As others have posted, modify your migration file before running it if > you are concerned about the size of varchars. > > For example, you can do the following, > > def self.up > create_table :mytable, :force => true do |t| > t.string :field_name, :null => false, :limit

[Rails] Re: Rails 3: Update responding with empty json

2010-03-22 Thread Fabio Kreusch
This is it (HAML): #category-form - form_for @category, :remote => true do |f| %fieldset %legend= t('activerecord.models.category') %p = f.label :name %br = f.text_field :name %p %button{:type => 'submit', :class => 'positive'}= t('dashboard.

[Rails] Re: Best search function plugin/gem for instant rails 2.0

2010-03-22 Thread E. Litwin
Try searchlogic - it is easy to use (although you say you are not a coder, so easy may be relative). On Mar 22, 10:07 am, Sam wrote: > Hi, I'm creating a simple web app for  with multiple tables my > university assignment and I need to create a search function. I've > heard about some search plug

[Rails] Re: Issues RUNNING mysql gem

2010-03-22 Thread E. Litwin
As others have posted, modify your migration file before running it if you are concerned about the size of varchars. For example, you can do the following, def self.up create_table :mytable, :force => true do |t| t.string :field_name, :null => false, :limit => 50, :default = "Some value"

[Rails] Re: How to reference a select_tag within a form

2010-03-22 Thread RichardOnRails
Hi Colin, I still don't have subversion not git working. But I pretty sure that http://www.pastie.org/881730 presents it all: three aspects of "new expenses": the .erb, the htm and the validator's. A second look a the validation failure led me to think that substituting object for div would solv

[Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Colin Law wrote: > On 22 March 2010 04:43, Mike Montagne wrote: >> In the former, you're not even passing the information to the >> environment to build the tables you want. Of course then, it's critical >> to convey your intended design to deployment. A varchar(25) (intended >> field designation)

Re: [Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 2:51 PM, RichardOnRails wrote: > Thanks for joining the conversation.  I ran my the HTML page which was > generated by my .erb.  I had a form_for with an embedded div and the > HTML page had an embedded div.  W3C didn't like it.  The details are > at http://www.pastie.org/

Re: [Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread Michael Pavling
On 22 March 2010 21:51, RichardOnRails wrote: > Hi Hassan, > > Thanks for joining the conversation.  I ran my the HTML page which was > generated by my .erb.  I had a form_for with an embedded div and the > HTML page had an embedded div.  W3C didn't like it.  The details are > at http://www.pastie

[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread RichardOnRails
Hi Hassan, Thanks for joining the conversation. I ran my the HTML page which was generated by my .erb. I had a form_for with an embedded div and the HTML page had an embedded div. W3C didn't like it. The details are at http://www.pastie.org/881730. Now that I look at it again, perhaps the Obj

Re: [Rails] How to reference a select_tag within a form

2010-03-22 Thread Colin Law
On 22 March 2010 21:18, RichardOnRails wrote: > Hi All, > > Inside my app\views\expenses\new.html.erb file, I had the code: > > <% form_for(@expense) do |f| %> > [snip] >   >    <%= f.label :vendor %> >    <%= f.text_field :vendor %> >     >                  options_for_select(@current_vendors.col

[Rails] How to reference a select_tag within a form

2010-03-22 Thread RichardOnRails
Hi All, Inside my app\views\expenses\new.html.erb file, I had the code: <% form_for(@expense) do |f| %> [snip] <%= f.label :vendor %> <%= f.text_field :vendor %> true} %> It brought up a list of vendor-names immediately under my Vendors textbox, which worked great as

Re: [Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 1:35 PM, RichardOnRails wrote: > Your "how's the HTML" question really did the job: > tag not allowed within the scope of a tag. What gives you that idea? It's simply not true. -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan -

[Rails] Re: Problem with model validation with ajax

2010-03-22 Thread Piotr
I just realized it too... so bad for me :) Ok, I thought there would be another more convenient way but as I can now see there is not Regards, thanks everyone On 22 Mar, 21:21, Stephan Wehner wrote: > Piotr Mąsior wrote: > > Model is passed by @model variable with nested attributes so it is > >

[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread RichardOnRails
Hey Colin, Your "how's the HTML" question really did the job: tag not allowed within the scope of a tag. Which means the my .erb can't have: <% form_for(@expense) do |f| %> [snip] <%= select_tag "test", options_for_select(@current_vendors.collect { |v| v.nickname

[Rails] Re: Problem with model validation with ajax

2010-03-22 Thread Stephan Wehner
Piotr Mąsior wrote: > Model is passed by @model variable with nested attributes so it is > like: > > @model = model.new > @model.build_another > > at form it is looped through like > > - form_for @account, :url => { :action => @given_action , :controller > => 'admin'} do |f| > - f.fields_for :

[Rails] Re: How do I set defaults for view parameters?

2010-03-22 Thread E. Litwin
params[:find_dates].nil? On Mar 22, 12:22 pm, Civ2boss wrote: > How would I go about testing the parameter? > > On Mar 22, 1:35 pm, Colin Law wrote: > > > On 22 March 2010 16:34, Civ2boss wrote: > > > > So I am making a rails app that lets users search logs by date. So in > > > my controller I

[Rails] Re: Problem with model validation with ajax

2010-03-22 Thread Piotr
Model is passed by @model variable with nested attributes so it is like: @model = model.new @model.build_another at form it is looped through like - form_for @account, :url => { :action => @given_action , :controller => 'admin'} do |f| - f.fields_for :company do |o| %label{:for => "compa

[Rails] Upgrade to 3.0

2010-03-22 Thread tashfeen.ekram
I am working with a project we are getting ready to release and now wondering if we should start looking at upgrading to 3.0 beofre releasing. I was hoping to get some advice. Of course, upgrading something once it is released is much harder than doing it prior to release. However, I am not sure w

[Rails] Re: How do I set defaults for view parameters?

2010-03-22 Thread Civ2boss
How would I go about testing the parameter? On Mar 22, 1:35 pm, Colin Law wrote: > On 22 March 2010 16:34, Civ2boss wrote: > > > > > So I am making a rails app that lets users search logs by date. So in > > my controller I have set it to look for logs from the DB using the > > parameters. Howeve

[Rails] Re: Simple Backup???

2010-03-22 Thread nshenry03
Yes and Yes On Mar 20, 5:25 am, David Chua wrote: > Is the Apache config the same, is the routes.rb correctly configured? > > On Mar 20, 2010 7:03 PM, "nshenry03" wrote: > > I am simply trying to backup a ruby on rails app... I have created an > archive of the entire database and application fol

[Rails] Ignite RailsConf call for speaking proposals

2010-03-22 Thread Mike Subelsky
hey everyone, The Rails community in Baltimore is throwing an unofficial but really awesome pre-party for RailsConf on 6/6/10: Ignite RailsConf. We're currently looking for speakers who'd like to give an interesting, high- energy 5 minute talk on any subject. You don't have to be attending RailsC

[Rails] Re: Problem with model validation with ajax

2010-03-22 Thread Stephan Wehner
Piotr Mąsior wrote: > So painful, I was wondering is there any dry_save or something like > this ? How do you populate your @model? Stephan -- 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 po

[Rails] Re: Problem with model validation with ajax

2010-03-22 Thread Piotr
So painful, I was wondering is there any dry_save or something like this ? On 22 Mar, 18:13, Frederick Cheung wrote: > On Mar 22, 4:59 pm, Piotr Mąsior > > wrote: > > I have got a problem with :on => create validation > > > validates_uniqueness_of :nip, :regon, on => :create > > The  :on there

Re: [Rails] Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Colin Law
On 22 March 2010 04:43, Mike Montagne wrote: > In the former, you're not even passing the information to the > environment to build the tables you want. Of course then, it's critical > to convey your intended design to deployment. A varchar(25) (intended > field designation) requires 1/10th the di

Re: [Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Colin Law
On 22 March 2010 16:08, Mike Montagne wrote: > So let's not argue about this. I should be able to *start* with my > intended design far faster than I can *eventually* modify a wrong design > -- imposed in the name of "agility" -- to the right one (which in the > least, is twice the work). If you

Re: [Rails] How do I set defaults for view parameters?

2010-03-22 Thread Colin Law
On 22 March 2010 16:34, Civ2boss wrote: > So I am making a rails app that lets users search logs by date. So in > my controller I have set it to look for logs from the DB using the > parameters. However when it first loads, there are no parameters > passed to the controller, so it gives a nil erro

[Rails] Re: How to debug and profile rails library code ( in windows )

2010-03-22 Thread Ryan Grow
Thanks Luke - freezing the gems is what I need because I am embedding ruby profile calls in there. However, now I'm trying to add the profiling inside mongrel, because the profiling I added in ActionController::Base.process did not show me where the delay is occurring. I did an unpack of mongr

Re: [Rails] Amazon S3 and ffmpeg

2010-03-22 Thread Ivan Nastyukhin
buy ec2 upload directly to s3 then ec2machine(or ferm) download from s3, convert, and upload to s3 traffic between ec2 and s3 free __ Best Regards, Dieinzige On Mar 22, 2010, at 7:23 PM, James Finley wrote: > So we are setting up a file upload system for our web app. Files will > be uploaded to

[Rails] Re: sub accounts

2010-03-22 Thread mlittle
Anyone else able to provide me with some insight on implementing this? On Mar 21, 10:55 pm, mlittle wrote: > On Mar 21, 10:46 pm, Loganathan Ganesan wrote: > > > > > mlittle wrote: > > > On Mar 21, 10:33 pm, Loganathan Ganesan wrote: > > >> I suggest the following database model: > > >> UserID

[Rails] Re: Problem with model validation with ajax

2010-03-22 Thread Frederick Cheung
On Mar 22, 4:59 pm, Piotr Mąsior wrote: > I have got a problem with :on => create validation > > validates_uniqueness_of :nip, :regon, on => :create The :on there doesn't refer to the controller action - it refers to whether the save is an update to an existing record or not. Fred > > Doesn

[Rails] How do I set defaults for view parameters?

2010-03-22 Thread Civ2boss
So I am making a rails app that lets users search logs by date. So in my controller I have set it to look for logs from the DB using the parameters. However when it first loads, there are no parameters passed to the controller, so it gives a nil error. Is there a way to set the default parameters

[Rails] Amazon S3 and ffmpeg

2010-03-22 Thread James Finley
So we are setting up a file upload system for our web app. Files will be uploaded to Amazon S3, and videos need to be converted to ffmpeg. We have had problems with uploading of large files timing out, and it was suggested to us to use http://github.com/elcgit/s3-swf-upload-plugin for uploading dir

[Rails] Problem with model validation with ajax

2010-03-22 Thread Piotr
I have got a problem with :on => create validation validates_uniqueness_of :nip, :regon, on => :create Doesn't work properly when I call it via xhr In my log Processing AdminController#doajaxing_for_updateuser (for 127.0.0.1 at 2010-03-22 17:37:13) [PUT] Parameters: {"account"=>{"company_attr

[Rails] Best search function plugin/gem for instant rails 2.0

2010-03-22 Thread Sam
Hi, I'm creating a simple web app for with multiple tables my university assignment and I need to create a search function. I've heard about some search plugins and gems but I'm not sure which is the best one to use. I'm not much of a coder so if anyone could reccomend a fairly easy plugin/gem tha

[Rails] Presentation Ideas

2010-03-22 Thread Josh Cheek
Hi, I'm going to give a talk on Rails to my campus ACM group in about two weeks. I'm trying to think of ideas. The 15 minute blog is great, and I'd kind of like to do something like that, but I can't do better than DHH or Ryan have, and if they look into it more, they'll come across that pretty qui

[Rails] Re: factory_girl factory gem: problem with simple associations

2010-03-22 Thread Grary
No takers, huh? On Mar 22, 10:00 am, Grary wrote: > Hi, > > Can anyone familiar with the use of factory_girl please comment on why > I don't succeed with the following: > > has_one_instance = Factory.build(:has_one_class) > assert_equal 10, has_one_instance.belongs_to_class.some_attribute > > ...

[Rails] Default pricing and custom client pricing

2010-03-22 Thread Tony Tony
Hi all, I have a personal project I'm planning and I came to a small hurdle. I want to have an item with a price that will be the default for all clients/users. However, in my business I have some clients that are grandfathered in to some special pricing. In the case of these grandfathered in cas

[Rails] Invitation tracking

2010-03-22 Thread badnaam
Hi, Here is my use case... A user of the site can invite friends to join the site and when a friend joins, the invitee is awarded. What could be the best way in Rails to track if a user is signing up as a result of someone's invitation? Is there a plugin for such purposes? Thanks -- You receiv

[Rails] Rails Configuration: use Proc's or method overrides?

2010-03-22 Thread Stephan Wehner
I came across a ticket by Craig Webster at https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4247-customising-asset-paths#ticket-4247-5 and found it quite interesting. Quote: This patch allows you to set the way that asset paths are rewritten. My own use case was to accommodat

[Rails] Re: problems with after_save callback

2010-03-22 Thread Luke Pearce
Yoram Bernet wrote: > As for your second suggestion - if I understand it correctly, that is > in fact what I am doing. The emission's after save handler calls > emitter.update_emitter_emissions, which then runs through the entire > list of emissions, making changes as necessary. But that doesn't >

[Rails] Re: Deploying my rails app to GoDaddy

2010-03-22 Thread Luke Pearce
Oh and one other thing - make sure you freeze your gems! Cheers Luke -- 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 rubyonrails-t...@googlegroups.com. To un

[Rails] Re: Deploying my rails app to GoDaddy

2010-03-22 Thread Luke Pearce
Butterson wrote: > So I've written my first real-world RoR app and I'm now getting ready > to deploy it. Unfortunately, my client decided to use GoDaddy as the > hosting provider and based on what I've seen so far from the web, it's > not really the smoothest or ideal hosting for RoR apps. There we

[Rails] Re: Re: Re: Issues RUNNING mysql gem

2010-03-22 Thread Mike Montagne
Hassan Schroeder wrote: > On Sun, Mar 21, 2010 at 9:43 PM, Mike Montagne > wrote: > >> These are regular concerns for anyone with a background in RDBMS, just >> now getting their feet wet in RoR. > > Let it go, at least for a short vacation :-) > > Do a quick search on "premature optimization

[Rails] Re: problems with after_save callback

2010-03-22 Thread Yoram
Thansk Luke. I'm not familiar with observers but will research them. Not yet knowing exactly what they are, I liked the fact that the after_save handler guarantees that all the after_save processing will be completed in the same thread as the save itself, thus avoiding the potential for any race co

[Rails] Re: How to debug and profile rails library code ( in windows )

2010-03-22 Thread Luke Pearce
> How do I configure my project which currently has gems installed for > rails to use source code so I can edit and debug it? I assume you're debugging anyways: http://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-ruby-debug If you do that you can step out into the rai

[Rails] Re: problems with after_save callback

2010-03-22 Thread Luke Pearce
Could you use an Observer instead? Or perhaps do the reverse and have the after_save of the emission call update_totals with its emitter? Cheers Luke -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" g

[Rails] Re: How to send back a response to an Ajax.request call

2010-03-22 Thread Frederick Cheung
On Mar 22, 3:05 pm, Mc Ieong wrote: > Hello, I have the following Ajax call which invoke the action > "check_skills" > >     new Ajax.Request('/persons/check_skills' >         {   method:'post', >       asynchronous: false, >       evalScripts:false, >       onSuccess: function(transport){ >    

[Rails] How to send back a response to an Ajax.request call

2010-03-22 Thread Mc Ieong
Hello, I have the following Ajax call which invoke the action "check_skills" new Ajax.Request('/persons/check_skills' { method:'post', asynchronous: false, evalScripts:false, onSuccess: function(transport){ var response = transport.responseText || "no respon

[Rails] How to debug and profile rails library code ( in windows )

2010-03-22 Thread Ryan Grow
Hi, I have a project on windows using rails 2.3.5, ruby 1.8.6, mysql 5.0.28, and mysql gem 2.8.1. I am trying to debug a problem where it seems like each rails thread hangs before it has the chance to release the db connection to the pool. When the number of active connections reaches the total nu

[Rails] Re: architectural question reg acts_as_tree (+ caching?)

2010-03-22 Thread Ar Chron
I think you'd want to look into a "load on demand" approach... Why marshal up all the data for all the nodes when most won't be visible? I'm assuming you show the subsidiary level(s) collapsed by default... Smells like a perfect situation for some AJAX implementation. I'm not sure caching is t

  1   2   >