[Rails] Couldn't find SalesOrder without an ID

2009-10-30 Thread Vishnu First
hi, I am doing unit testing. I have a table as SalesOrder, where "ordernumber" is the primary key of the table. When I insert records in the table from unit testing, I got error like, ActiveRecord::RecordNotFound: Couldn't find SalesOrder without an ID But, I have fixed the error by adding set

[Rails] Re: Firing Rails Controller Actions From Command Line Console

2009-10-30 Thread Tyler Jennings
I'm sorry if this derails your question, but it would be much better to factor the code so that the behavior your want to invoke is not tied up in the execution of the action. You might have heard smart people say Fat Model Skinny Controller

[Rails] Firing Rails Controller Actions From Command Line Console

2009-10-30 Thread Katherine
Hi... I trying to make this example work: http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/ I need it for sending out emails and doing a lot of other tasks from a specific action in a controller. The error I get is: rake actions:echo rake abor

[Rails] Ramaze app for Dynamic URL Music Generation

2009-10-30 Thread GabrielG1976
Started a new github on Ramaze app for Dynamic URL Music Generation and have laid the framework and foundation down feel free to fork or contribute to this project.. http://github.com/Gabrielg1976/Dynamic-URL-Music-Generator Gabriel G --~--~-~--~~~---~--~~ You rec

[Rails] Re: need help named route and link_to

2009-10-30 Thread Cs Webgrl
Gregory Mazurek wrote: > {:controller > => 'agents', :action => 'show', :agent => @property.agent.permalink} and > see > if that works. > Excellent! That worked. I had tried a variation of that, but must of missed something. Thanks for your help! -- Posted via http://www.ruby-forum.com/

[Rails] Re: What's your favorite thing about Rails?

2009-10-30 Thread Ar Chron
Convention over configuration -- 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-talk@googlegroups

[Rails] Re: What's your favorite thing about Rails?

2009-10-30 Thread sax
add nested restful resources to the mix On Oct 30, 3:18 pm, Trausti Thor Johannsson wrote: > Migrations among so many other things, and of course Ruby > > Trausti > > On Fri, Oct 30, 2009 at 10:25 PM, Marnen Laibow-Koser < > > > > rails-mailing-l...@andreas-s.net> wrote: > > > Philip Hallstrom w

[Rails] Re: need help named route and link_to

2009-10-30 Thread Gregory Mazurek
On Fri, Oct 30, 2009 at 5:52 PM, Cs Webgrl wrote: > > Gregory Mazurek wrote: > > > Can't you do this? <%= link_to_unless(@property.agent.nil?, "view bio", > > {agent_url, :name => @property.agent}) %> > > > > Unfortunately that generates an error: > > compile error > /show.rhtml:138: syntax error

[Rails] Re: I know this is a join, but not sure how to do it...

2009-10-30 Thread lunaclaire
yea! the following worked when I switched the logic to look for postings first... might not be the most efficient as marnen's suggestion, but for now I think it's good enough class Stream< ActiveRecord::Base def self.popular grouped_postings = Posting.find_by_sql(["select

[Rails] Re: Rails + sqlite3 - very slow data saving

2009-10-30 Thread ggolebio
Additionally I check it with sqlite2 and behaviour is similar. Save one row operation is usual little faster and takes ~0.35sec per row but insert into db is little slower ~2ms per row. Finally performance for sqlite2/3 is horrible. On 30 Paź, 22:34, ggolebio wrote: > Thanks. I have hope that fi

[Rails] Re: I know this is a join, but not sure how to do it...

2009-10-30 Thread lunaclaire
Thx, marnen (again) getting a MySQL error near 'p.count(*) as posting_count '... something it doesnt like there I'll try to figure that out, but if you see it, please let me know I'm also wondering if I could do a query for all the postings in the last 24 hrs and somehow sum them by their strea

[Rails] Re: What's your favorite thing about Rails?

2009-10-30 Thread Trausti Thor Johannsson
Migrations among so many other things, and of course Ruby Trausti On Fri, Oct 30, 2009 at 10:25 PM, Marnen Laibow-Koser < rails-mailing-l...@andreas-s.net> wrote: > > Philip Hallstrom wrote: > >> What do seasoned developers really enjoy about Rails. How does it make > >> your life easier? > >>

[Rails] Re: page.call

2009-10-30 Thread Frederick Cheung
On Oct 30, 8:06 pm, Wtn Tn wrote: > Frederick Cheung wrote: > > On Oct 30, 6:03 pm, Wtn Tn wrote: > > >> Any idea what i'm doing wrong here. Any input is greatly appreciated. > > > What's in your rjs file ? > > > Fred > > > function my_function(test){alert(test);} > > page.call my_function

[Rails] Re: Starting server is failing on Mac OSX 10.6 Snow Leopard

2009-10-30 Thread Kurt
I am still running into this issue even after reinstalling hpricot under Snow Leopard. When I require 'hpricot' I get this error: /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.8.1/lib/ hpricot_scan.bundle: mach-o, but wrong architecture - /usr/local/lib/ ruby/gems/1.8/gems/hpricot-0.8.1/lib

[Rails] Re: Problems installing ruby gems on linux

2009-10-30 Thread keldog
mpcengineer, I just reinstalled my rails app on an ubuntu slice the other day. For what it's worth, I'd recommend apt-get. It's been a real time-saver for me: 1) sudo apt-get update #updates the apt-get software 2) sudo apt-get install rubygems # installs rubygems Just those 2 commands did it

[Rails] Re: need help named route and link_to

2009-10-30 Thread Cs Webgrl
Gregory Mazurek wrote: > Can't you do this? <%= link_to_unless(@property.agent.nil?, "view bio", > {agent_url, :name => @property.agent}) %> Unfortunately that generates an error: compile error /show.rhtml:138: syntax error, unexpected tASSOC, expecting '}' ... :agent =>

[Rails] Re: eager loading with dynamic conditions?

2009-10-30 Thread mike
In this case you should use 2 finds. One to find the records and one to find all associated records. On the associated records array you can do a find { |record| record.associated_id == actual.id} this is the same effect as eager loading. I dont know if a lambda would work on the association, thou

[Rails] Re: Rails + sqlite3 - very slow data saving

2009-10-30 Thread ggolebio
Thanks. I have hope that finally it'll be something wrong in my configuration. On 30 Paź, 15:53, Jillian Galloway wrote: > Wow I have basically the same setup and I'm not experiencing that. > I'll set up a mini project with exactly the same db schema and code that > you're using and see what hap

[Rails] Re: What's your favorite thing about Rails?

2009-10-30 Thread Marnen Laibow-Koser
Philip Hallstrom wrote: >> What do seasoned developers really enjoy about Rails. How does it make >> your life easier? >> >> This is for favorites, not what you don't like. > > There's lots of things I like, but I'd say the longer I use Rails, the > more I realize that what I *really* like is tha

[Rails] Re: Problems installing ruby gems on linux

2009-10-30 Thread mike
Hi! It is also possible to install ruby from phusion, which is called enterprise ruby. It comes with rubygems and has detailed installation instructions. 2009/10/30, Conrad Taylor : > Hi, is it possible to install Rubygems via the rpm package manager? > > -Conrad > > On Thu, Oct 29, 2009 at 2:23

[Rails] Re: I know this is a join, but not sure how to do it...

2009-10-30 Thread Marnen Laibow-Koser
lunaclaire wrote: > here are a few models: > > Stream > has_many :postings > belongs_to :user > > Posting > belongs_to :stream > belongs_to :user > > User > has_many :streams > has_many :postings > > > Each Posting has a 'created_at' attribute. > > I need to find 'popular' stream

[Rails] Re: need help named route and link_to

2009-10-30 Thread Gregory Mazurek
Hi, On Fri, Oct 30, 2009 at 4:31 PM, Cs Webgrl wrote: > > Hi, > > In my application I've set up a custom route that works as long as I > stay within the same model. This makes me think that I must have > something wrong with the route. > > map.agent ':agent', :controller => 'agents', :action =>

[Rails] need help named route and link_to

2009-10-30 Thread Cs Webgrl
Hi, In my application I've set up a custom route that works as long as I stay within the same model. This makes me think that I must have something wrong with the route. map.agent ':agent', :controller => 'agents', :action => 'show' The resulting url is http://www.domain.com/firstname-lastname

[Rails] Re: What's your favorite thing about Rails?

2009-10-30 Thread Gregory Mazurek
On Fri, Oct 30, 2009 at 4:16 PM, bill walton wrote: > > On Fri, 2009-10-30 at 12:22 -0700, Philip Hallstrom wrote: > > > What do seasoned developers really enjoy about Rails. How does it make > > > your life easier? > > > > > > This is for favorites, not what you don't like. > > > > There's lots

[Rails] I know this is a join, but not sure how to do it...

2009-10-30 Thread lunaclaire
here are a few models: Stream has_many :postings belongs_to :user Posting belongs_to :stream belongs_to :user User has_many :streams has_many :postings Each Posting has a 'created_at' attribute. I need to find 'popular' streams based on those that have the most, recent postings (

[Rails] Re: What's your favorite thing about Rails?

2009-10-30 Thread bill walton
On Fri, 2009-10-30 at 12:22 -0700, Philip Hallstrom wrote: > > What do seasoned developers really enjoy about Rails. How does it make > > your life easier? > > > > This is for favorites, not what you don't like. > > There's lots of things I like, but I'd say the longer I use Rails, the > more I

[Rails] Re: page.call

2009-10-30 Thread Wtn Tn
Frederick Cheung wrote: > On Oct 30, 6:03�pm, Wtn Tn wrote: >> >> Any idea what i'm doing wrong here. Any input is greatly appreciated. >> > What's in your rjs file ? > > Fred function my_function(test){alert(test);} page.call my_function -- Posted via http://www.ruby-forum.com/. --~--~

[Rails] Re: Ajax in RoR - observe_field

2009-10-30 Thread Misiek Sz
I created clean new app to test and poke around. I got to work, but I wonder if there is still a better way to handle it and someone could point it our. So i have two models: class Project < ActiveRecord::Base has_one :task end class Widget < ActiveRecord::Base belongs_to :project val

[Rails] Re: form_tag wih two Button

2009-10-30 Thread Glen
In order to create a JavaScript-only button, you have to use "button_to_function" helper instead of "submit_tag". See the following documentation. http://api.rubyonrails.org/classes/ActionView/Helpers/JavaScriptHelper.html#M001757 Glen On Oct 30, 1:33 am, Simoha Simoha wrote: > hi Seenu, t

[Rails] Re: What's your favorite thing about Rails?

2009-10-30 Thread Philip Hallstrom
> What do seasoned developers really enjoy about Rails. How does it make > your life easier? > > This is for favorites, not what you don't like. There's lots of things I like, but I'd say the longer I use Rails, the more I realize that what I *really* like is that it's built with Ruby. Ruby

[Rails] Re: script/generate broken on vendored rails2.3.4 project

2009-10-30 Thread Rick DeNatale
I tracked it down. The problem was being caused by the log_buddy gem http://github.com/relevance/log_buddy This adds a logger method to Object which clobbers the Rails generator script commands logger. That cost me an hour or two. On Fri, Oct 30, 2009 at 1:06 PM, Rick DeNatale wrote: > I was

[Rails] Re: page.call

2009-10-30 Thread Frederick Cheung
On Oct 30, 6:03 pm, Wtn Tn wrote: > Hi Everyone, > > I'm trying to get page.call to work and if i call  something like > page.call 'alert', 'this is a test' > everything works ok, however when i try calling a function that i > defined in application.js > function my_function(){ >     alert('this

[Rails] What's your favorite thing about Rails?

2009-10-30 Thread Dustin
What do seasoned developers really enjoy about Rails. How does it make your life easier? This is for favorites, not what you don't like. Thanks, Dustin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] Re: paginate issues

2009-10-30 Thread Rick
One change from my previous - I misspoke when I identified a problem with the view pagination controls under ruby 1.9. I've done some added checking an determined that the problem is actually related to Rails3. So, as long as you're not out there on the bloody edge... :-) On Oct 30, 10:47 am,

[Rails] page.call

2009-10-30 Thread Wtn Tn
Hi Everyone, I'm trying to get page.call to work and if i call something like page.call 'alert', 'this is a test' everything works ok, however when i try calling a function that i defined in application.js function my_function(){ alert('this is a test'); } i get NameError (undefined local va

[Rails] Re: script/generate broken on vendored rails2.3.4 project

2009-10-30 Thread Rick DeNatale
So the following seems to only happen when I run script/generate under ruby 1.9.1 If I use 1.8.7 script/generate works! On Fri, Oct 30, 2009 at 1:06 PM, Rick DeNatale wrote: > I was trying to add cucumber to a project which is using rails2.3.4 > (which is vendored).   The script/generate cucumb

[Rails] Re: Native sql query with array-like, prepared statement

2009-10-30 Thread neomizer
On 30 Okt., 17:34, Gregory Mazurek wrote: > On Fri, Oct 30, 2009 at 12:10 PM, neomizer wrote: > > > On 30 Okt., 15:00, Gregory Mazurek wrote: > > > On Fri, Oct 30, 2009 at 3:57 AM, neomizer wrote: > > > > > Hi, > > > > > I'm using in my project ActiveRecord::Base.connection.select_value and

[Rails] Re: MySQL, unsigned bigint and fixtures

2009-10-30 Thread Marnen Laibow-Koser
Foon wrote: > I will opt for the string column storage solution since I definitely > need to have 64-bit unsigned integers. Moreover, that would enable my > applicaton to handle even larger integers would that become a > requirement, which is very likely. > Regarding my app, each value will be con

[Rails] Re: Native sql query with array-like, prepared statement

2009-10-30 Thread Marnen Laibow-Koser
neomizer wrote: > On 30 Okt., 15:00, Gregory Mazurek wrote: >> >> > Is there any way to execute a model-unrelated sql-query by passing an >> > array (["select from model where =?","nice- >> > value"]) instead of a string?! >> >> Why can't you use find_by_sql instead >> of ActiveRecord::Base.conn

[Rails] script/generate broken on vendored rails2.3.4 project

2009-10-30 Thread Rick DeNatale
I was trying to add cucumber to a project which is using rails2.3.4 (which is vendored). The script/generate cucumber step is failing. I first thought that this was a problem specific to cucumber but it appears that script/generate is broken in general: $ script/generate model foo --backtrace

[Rails] Re: Native sql query with array-like, prepared statement

2009-10-30 Thread Gregory Mazurek
On Fri, Oct 30, 2009 at 12:10 PM, neomizer wrote: > > > > On 30 Okt., 15:00, Gregory Mazurek wrote: > > On Fri, Oct 30, 2009 at 3:57 AM, neomizer wrote: > > > > > Hi, > > > > > I'm using in my project ActiveRecord::Base.connection.select_value and > > > ActiveRecord::Base.connection.select_rows

[Rails] Re: Native sql query with array-like, prepared statement

2009-10-30 Thread neomizer
On 30 Okt., 15:00, Gregory Mazurek wrote: > On Fri, Oct 30, 2009 at 3:57 AM, neomizer wrote: > > > Hi, > > > I'm using in my project ActiveRecord::Base.connection.select_value and > > ActiveRecord::Base.connection.select_rows several times to execute > > complex queries. This basically works,

[Rails] Re: Any pioneers who've configured passenger to support some

2009-10-30 Thread Marnen Laibow-Koser
Rick Denatale wrote: > Passenger configuration selects which ruby executable to use via a > global configuration variable (at least for Apache, I assume it's the > same for Nginx). > > I'm in a situation where I've got at least one rails app I'd like to > run on 1.9 while others remain on 1.8. T

[Rails] Re: Rails + sqlite3 - very slow data saving

2009-10-30 Thread Jillian Galloway
Wow I have basically the same setup and I'm not experiencing that. I'll set up a mini project with exactly the same db schema and code that you're using and see what happens, maybe I'll see the problem. It'll take a little while but I'll get back to you with the results. On Thu, Oct 29, 2009

[Rails] Re: paginate issues

2009-10-30 Thread Jillian Galloway
This is a great idea. I always make mini projects to learn new functionality and then move it to my main project when I've got it working right. On Fri, Oct 30, 2009 at 9:25 AM, Rick wrote: > > I would suggest that you start a new app just to learn how to use > pagination. RailsSpace is a goo

[Rails] Re: nested_attributes and fields_for and ajax

2009-10-30 Thread mrmanishs
These are good examples of using form_for/fields_for nested attributes, which I have no problems with. It's integrating Ajax with fields_for which is causing pain. On Oct 30, 9:51 am, Pat Shaughnessy wrote: > Hi... you might want to take a look > at:http://github.com/alloy/complex-form-examples

[Rails] Re: Native sql query with array-like, prepared statement

2009-10-30 Thread Gregory Mazurek
On Fri, Oct 30, 2009 at 3:57 AM, neomizer wrote: > > Hi, > > I'm using in my project ActiveRecord::Base.connection.select_value and > ActiveRecord::Base.connection.select_rows several times to execute > complex queries. This basically works, but I need to check the params > in order to avoid sql-

[Rails] Any pioneers who've configured passenger to support some apps running in 1.8.x others in 1.9?

2009-10-30 Thread Rick DeNatale
Passenger configuration selects which ruby executable to use via a global configuration variable (at least for Apache, I assume it's the same for Nginx). I'm in a situation where I've got at least one rails app I'd like to run on 1.9 while others remain on 1.8. This is for my development machine

[Rails] Re: nested_attributes and fields_for and ajax

2009-10-30 Thread Pat Shaughnessy
Hi... you might want to take a look at: http://github.com/alloy/complex-form-examples And: http://github.com/ryanb/complex-form-examples Both of these are interesting sample apps loaded with good coding ideas. I don't believe either of them uses AJAX or link_to_remote exactly the way you intende

[Rails] Re: updating model while reading CSV

2009-10-30 Thread Pat Shaughnessy
Sorry... forgot to mention the way it works is: - the first row of the CSV is taken as a list of column names - the remaining csv rows are data for new models - if your model contains a column/attribute matching one of the csv column names, it will be loaded - each new record is yielded to a block

[Rails] Re: updating model while reading CSV

2009-10-30 Thread Pat Shaughnessy
Hey John, Last week I wrote this code to allow you to easily create models/ records using FasterCSV... it doesn't directly answer your question, but it might help or at least give you some ideas: http://pastie.org/676681 If it looks this would be useful to you or others I can post it on github;

[Rails] Re: Problem getting started with auto_complete

2009-10-30 Thread Pat Shaughnessy
I'm happy to try to help you debug this one... if you want TAR up some/ all of the code and email it to me: p...@patshaughnessy.net ... however, I expect if I do run your code on my machine it will work no problem. My guess is there's some environment issue you have. The first thing I would try

[Rails] Re: paginate issues

2009-10-30 Thread Rick
I would suggest that you start a new app just to learn how to use pagination. RailsSpace is a good tutorial but there are several "version of..." issues embedded in the code. Pagination is one. 1) "gem install mislav-will_paginate" (or "sudo gem install mislav-will_paginate" if you mu

[Rails] Re: passenger ajax problem?

2009-10-30 Thread Peter De Berdt
On 30 Oct 2009, at 13:44, fRAnKEnSTEin wrote: > i am using this script: http://www.craigambrose.com/projects/redbox to > overlay a box with html content inside. The script makes an ajax call > for rendering the data, when i use mongrel everything works fine, but > on my production server i use ph

[Rails] passenger ajax problem?

2009-10-30 Thread fRAnKEnSTEin
Hi, i am using this script: http://www.craigambrose.com/projects/redbox to overlay a box with html content inside. The script makes an ajax call for rendering the data, when i use mongrel everything works fine, but on my production server i use phusion passenger, in this case, the script does not

[Rails] Online Web Calendar

2009-10-30 Thread Pepe Sanchez
Hi all, Is there an apllicaiton that allows to handle an Online Web Calendar, similar to the TaDalist.com? Regards -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby o

[Rails] Re: form_tag wih two Button

2009-10-30 Thread Simoha Simoha
hi Seenu, thanks for replay. I think I have not correctly formulated my problem. I want, if I click the check button only the javascript function (check()) called . . function scheck(){ alert("test"); } <% form_tag :action=>new %> <% submit_tag 'send' ,:name=>save%> <% submit_tag 'check', :name

[Rails] Re: relating javascript...........

2009-10-30 Thread Sijo k g
Hi Try this <% form_tag({:action => "login"}, {:onclick => "return validate_form(this)"}) do %> Sijo K George -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Re: relating javascript...........

2009-10-30 Thread HUNT HUNT
Thanks Fred for your reply, actually the problem is Using form tag I made a login form as discussed above. For client side validation I use Javascript. <% form_tag :action => "login", onClick => 'return validation_form(this)' %> <% submit_tag 'save'%> This is not working means client side v

[Rails] Re: What's the simplest way to use ActiveResource in ruby (without rails)?

2009-10-30 Thread skarayan
Thank you for the response, but I am looking for ActiveResource and not ActiveRecord. ActiveResource is the REST component of Rails. On Oct 29, 3:29 pm, Ilan Berci wrote: > skarayan wrote: > > I would like to use this class in a standalone project, but I have > > been unsuccessful thus far. > >

[Rails] Re: relating javascript...........

2009-10-30 Thread Frederick Cheung
On Oct 30, 9:19 am, HUNT HUNT wrote: > <% form_tag :action => "login", :html_options => {:onClick => "return > validate_form(this)"}  do %> > Login: <%= text_field_tag :name  %> > Password: <%= password_field_tag :password %> > <%= submit_tag "SignIn" %> > <% end %> > <%= link_to 'SignUp', :act

[Rails] Re: Access to calling chain associations

2009-10-30 Thread Frederick Cheung
On Oct 30, 7:04 am, Jake We wrote: > Assuming that we have a player model and a game model and that each game > has multiple players as described below. > > class Game < ActiveRecord::Base >   has_many :players > >   def some_method >     # >     #  which player called me? >     # >   end > > e

[Rails] nested_attributes and fields_for and ajax

2009-10-30 Thread mrmanishs
Hello there, I have a form_for and a fields_for within the form_for. I want to add/delete item in the fields_for and refresh the items in the fields_for list without having to regenerate the whole form. Now, if I set up link_to_remotes for adding/deleting the item in fields_for, it calls the cont

[Rails] relating javascript...........

2009-10-30 Thread HUNT HUNT
<% form_tag :action => "login", :html_options => {:onClick => "return validate_form(this)"} do %> Login: <%= text_field_tag :name %> Password: <%= password_field_tag :password %> <%= submit_tag "SignIn" %> <% end %> <%= link_to 'SignUp', :action => 'signup' %> <%= link_to 'Forgot Password', :act

[Rails] Re: iPhone editor -- was: Re: Your Ruby IDE

2009-10-30 Thread Paolo Montrasio
Marnen Laibow-Koser wrote: > I agree -- emacs is absolutely my console editor of choice. But I don't > like using console editors when a GUI editor is available. emacs is a GUI editor nowadays. The Linux GTK version based on emacs 23 is great. You can do everything with the mouse and menus, ev

[Rails] Re: facing error in gmail account.

2009-10-30 Thread Sachin
Hi, I founded some forums releated to gmail issues on Rails, So i thought some buddy will give positive response on my gmail problem and I posted my question over the rails. if rails is not the right place then would you plz tell me where i post my question from where i vl get response. regards,

[Rails] Re: form_tag wih two Button

2009-10-30 Thread srinivasan sakthivel
Hi U can try this Controller: def new if params[:save] @val = Product.new(params[:product]) @val.save @flash[:notice]="Supplier successfully created." end if params[:check] @users = Product.find(params[:id]) @users.update_attributes(params[:product]) @flash[:notice]="Supplier has been updated suc

[Rails] Re: Best Practice For Displaying Data

2009-10-30 Thread Anthony Gardner
Doh, I didn't think of linking pools to terms in the Term model. that was what I was missing. Your other points are correct but in the example I gave, there is only one current term (so the :order date_from isn't needed) but for previous and future terms,the :order => date_from is needed. Thanks

[Rails] Re: MySQL, unsigned bigint and fixtures

2009-10-30 Thread Foon
I will opt for the string column storage solution since I definitely need to have 64-bit unsigned integers. Moreover, that would enable my applicaton to handle even larger integers would that become a requirement, which is very likely. Regarding my app, each value will be converted to int in the f

[Rails] form_tag wih two Button

2009-10-30 Thread Simoha Simoha
i have a form_tag with two button: <% form_tag "/controller/action" %> <% submit_tag 'send' %> <% submit_tag 'check', :onclick => "javascript:... %> <% end %> I would if I click on check-button, javascript is ONLY called and not the Action. And when i click the send-button the action is called. C

[Rails] Native sql query with array-like, prepared statement

2009-10-30 Thread neomizer
Hi, I'm using in my project ActiveRecord::Base.connection.select_value and ActiveRecord::Base.connection.select_rows several times to execute complex queries. This basically works, but I need to check the params in order to avoid sql-injection by myself. Even worse I've to handle basic datatype c

[Rails] Re: User driven form creator?

2009-10-30 Thread steve bell
It could be htmlish, as long as it would be something that a business type user could learn. On Oct 29, 12:37 pm, Marnen Laibow-Koser wrote: > steve bell wrote: > > Yup, email as the delivery as it fits with their current workflow. > > However I'd still keep the data in the system in a table for

[Rails] Re: What is the future of Ruby on Rails? MySQL? Compare with Java, MS SQL or Oracle?

2009-10-30 Thread Dustin
Check out the InfoEther Ruby on Rails Ecosystem White Paper. They pulled together months of research to give you a detailed view/outlook on Rails from top to bottom. It was just released so it is very up-to- date. I think it's a must read. Below is the link: http://www.infoether.com/ruby-and-rai

[Rails] Re: including helpers in controller

2009-10-30 Thread Jake We
Technically helpers for for the view, but it can be done through the use of @template. Check out Ryan Bates' RailsCast on the subject. http://railscasts.com/episodes/132-helpers-outside-views -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You r

[Rails] Access to calling chain associations

2009-10-30 Thread Jake We
Assuming that we have a player model and a game model and that each game has multiple players as described below. class Game < ActiveRecord::Base has_many :players def some_method # # which player called me? # end end class Player < ActiveRecord::Base belongs_to :game end