[Rails] [job] Ruby on Rails consultant needed in San Francisco, CA

2010-05-27 Thread Charles Jo
Apply by email to: charl...@sonic.net Contact: Charles Jo Recruiter/Sourcer 408.668.4226 charl...@sonic.net http://www.linkedin.com/in/charlesjo Requirements: - 8+ years software development - 3+ years web application development - 2+ years Ruby on Rails -- You received this message because

[Rails] Question on Rails 3 : forms ORM ActiveModel

2010-05-27 Thread Alexandru Nedelcu
I'm a Django/Catalyst user that's evaluating Rails ... I need a Ruby framework, and I'm trying to see if learning Rails is worth it or I should just go for Sinatra + various libs available. Django has a couple of things I like ... 1) the Forms API In Django I like that it's being decoupled from

[Rails] Re: RJS suitable for doing interactivities within a webpage?

2010-05-27 Thread Frederick Cheung
On May 27, 6:48 am, Jian Lin li...@ruby-forum.com wrote: RJS is very good for sending Javascript code back to the browser saying Your AJAX is successful and by the way you can update the UI to signal to the user using the following Javascript I am going to send you. How about other webpage

[Rails] Re: Success message when using button_to_remote

2010-05-27 Thread Frederick Cheung
On May 27, 5:58 am, Ravi Dtv li...@ruby-forum.com wrote: Hii In a partial I used button_to_remote for deleting record. My record is deleted but message is not firing.  %= button_to_remote Delete, :url = {:controller = users , :action = deletegroup, :group_name=grouprow.group_name},

[Rails] Generator Documentation

2010-05-27 Thread James Nelson
Hi, I'm new to this list so sorry if i'm posting in the wrong place. I've just been looking through documentations for generators, as I've been trying to make a rails template for the various projects I'm doing now. It turns out that there really isn't any - especially for rails 3. I dug through

[Rails] Re: A few questions before i start to programm

2010-05-27 Thread roelof
Hello, Really nobody who wants to help ? Roelof On 26 mei, 19:17, Roelof Wobben li...@ruby-forum.com wrote: Hello, I want to learn ruby. As a learning experience I want to write a programm which people can put the results of games in a tournament. The programm produces which team is first

[Rails] Re: A few questions before i start to programm

2010-05-27 Thread Frederick Cheung
On May 27, 9:33 am, roelof rwob...@hotmail.com wrote: Hello, Really nobody who wants to help ? I think you questions are a mixture of over vague and over specific, for example i don't think you'll ever find a tutorial for your second question as that's quite a narrow question that depends

[Rails] URGENT + production migrations

2010-05-27 Thread Hemant Bhargava
Champs, I am in a great need of you people. My migrations are not running on production database. I done some changes in production mode and then i ran rake db:migrate RAILS_ENV=production / RAILS_ENV=production. But my database is not reflecting. Can you people tell me that what are the possible

Re: [Rails] rails 2.3.8 and I18n

2010-05-27 Thread Loïc Guitaut
Ok just found that now I have to add 'html' to all I18n keys that use html in their translations for this to work properly... While I can understand this approach, it's quite annoying when migrating an app from a previous version :( Le mercredi 26 mai 2010 18:13:39, Loïc Guitaut a écrit : Hi

Re: [Rails] URGENT + production migrations

2010-05-27 Thread Andy Jeffries
I am in a great need of you people. My migrations are not running on production database. I done some changes in production mode and then i ran rake db:migrate RAILS_ENV=production / RAILS_ENV=production. But my database is not reflecting. Can you people tell me that what are the possible

[Rails] Re: URGENT + production migrations

2010-05-27 Thread Hemant Bhargava
Andy Jeffries wrote: Have you changed database configuration in your database.yml? No. I have'nt changed. Are you getting any error messages (command line or in the log)? No i am not getting any error message at command line/log file. Did you create new migrations or edit existing

[Rails] Re: URGENT + production migrations

2010-05-27 Thread Frederick Cheung
On May 27, 11:16 am, Hemant Bhargava li...@ruby-forum.com wrote: I edited migrations on my local machine and checked in them.. :) Just now i realised that this could be the problem of me. Ok tell me one thing, if i edit a already migration file, and run rake db:migrate then would that

Re: [Rails] Re: URGENT + production migrations

2010-05-27 Thread Andy Jeffries
Did you create new migrations or edit existing ones? I edited migrations on my local machine and checked in them.. :) Just now i realised that this could be the problem of me. It is indeed :-) Ok tell me one thing, if i edit a already migration file, and run rake db:migrate then would that

[Rails] How to pass an Variable to an Partial?!?

2010-05-27 Thread happysmiley
Hello, I'm new in Rails and I'm Trying to implement a plattform were authorized people can apply Profiles to a special topic. The profil can be identified by the ID and the title in the data base. So in the view/profil/show_profil.html.erb the infomation of one Profil are perfektly shown. My

[Rails] Re: Generator Documentation

2010-05-27 Thread Alex P
if you enter script/generate –help you get a list of possible generators. for example, script/generate model –help gives you help on the model generator On May 27, 10:16 am, James Nelson zayd...@gmail.com wrote: Hi, I'm new to this list so sorry if i'm posting in the wrong place. I've just

[Rails] Re: A few questions before i start to programm

2010-05-27 Thread Alex P
Actually, the goal is trivial. Check out http://guides.rubyonrails.org/getting_started.html Install ruby, gem, rails, and start developing, ask questions as you go along. There's no such thing as tutorial for a menu or working space. Checking whether a team has already played the game is a matter

Re: [Rails] How to pass an Variable to an Partial?!?

2010-05-27 Thread Colin Law
On 27 May 2010 11:20, happysmiley toniz...@googlemail.com wrote: Hello, I'm new in Rails and I'm Trying to implement a plattform were authorized people can apply Profiles to a special topic. The profil can be identified by the ID and the title in the data base. So in the

[Rails] Re: Re: URGENT + production migrations

2010-05-27 Thread Hemant Bhargava
Andy Jeffries wrote: Did you create new migrations or edit existing ones? I edited migrations on my local machine and checked in them.. :) Just now i realised that this could be the problem of me. It is indeed :-) Resolved it. Thanks to all of you with a big smile .. :) :) Ok tell me

Re: [Rails] Re: Re: URGENT + production migrations

2010-05-27 Thread Andy Jeffries
I edited migrations on my local machine and checked in them.. :) Just now i realised that this could be the problem of me. It is indeed :-) Resolved it. Thanks to all of you with a big smile .. :) :) Happy to help. Good luck, Cheers, Andy -- You received this message because you are

[Rails] Rails 3 beta nested forms

2010-05-27 Thread AppleII717
Not sure if this the best place to look for rails 3.0 beta 3 help, but I'll give it a try. I can't seem to get nested forms to work in the beta - close but no workie! I used an approach similar to one I used in a 2.3 application to update a user record from a profile record (citizen has_one

[Rails] Re: Can I get meaningful page links using will_paginate?

2010-05-27 Thread RonPhillips
Ok, I am thinking search by title, then the results are sorted by date, so I want to label pages by date. There's a series of screenshots at http://www.flickr.com/photos/21409...@n08/ to show what I mean. If I expect lots of search results in a field to be identical, then I like to index by some

[Rails] Can only traverse a polymorphic association in one direction

2010-05-27 Thread BarryOg
Hi all, I'm working on a polymorphic association and I've run into a bit of a stumbling block. I only seem to be able to traverse the relationship in one direction and not the other. This is what my code looks like: class NodeEntry ActiveRecord::Base acts_as_nested_set belongs_to :node,

[Rails] Re: Can I get meaningful page links using will_paginate?

2010-05-27 Thread RonPhillips
Exactly! If you search for some term, and then specify an ordering of the results, the pages should be labeled with your ordering, not numbers. Let's say you search for dengue fever and then order by author. The page links should show the name of the author of the first article on the page. Then

Re: [Rails] Re: Generator Documentation

2010-05-27 Thread James
Sorry, to clarify this I mean in *writing* my own generators - using the Thor built in actions, the Rails ones, etc. Rails templates are what I'm actually trying to build. James On Thu, May 27, 2010 at 6:47 PM, Alex P oleksandr.pet...@gmail.com wrote: if you enter script/generate –help you

[Rails] Re: A few questions before i start to programm

2010-05-27 Thread Roelof Wobben
Alex P wrote: Actually, the goal is trivial. Check out http://guides.rubyonrails.org/getting_started.html Install ruby, gem, rails, and start developing, ask questions as you go along. There's no such thing as tutorial for a menu or working space. Checking whether a team has already played

[Rails] NoMethodError: You have a nil object when you didn't expect

2010-05-27 Thread Manivannanj Jeganathan
Hi, I have tried to use searchlogic in my application... in def index, @search = AccounDetail.search(params[:search]) @account_details = @search.all In index.rhtml %form_for @search do |f|% p %=f.label :name_like,Name% %=f.text_field :name_like% %=submit_tag :Search,:name=nil%

[Rails] Re: Rails 3 beta nested forms

2010-05-27 Thread AppleII717
It never fails! If you are having a problem trying to get something to work, post something looking for help and within 15 minutes, you'll figure it out! I went back and reviewed the railscast on nested forms, which used a has_many form and answered my 3rd question = you have to have an array.

[Rails] Re: Can I get meaningful page links using will_paginate?

2010-05-27 Thread Ron Phillips
RobertWalker wrote: What I think is even more nuts is to have to slog through 137 pages of results without having a decent way to filer that down to just a few pages at most. For example. I very rarely make it past about page 3 or 4 of a Google search result set. I'd never make it to page 125.

[Rails] Re: Can I get meaningful page links using will_paginate?

2010-05-27 Thread Ron Phillips
RonPhillips wrote: Ok, I am thinking search by title, then the results are sorted by date, so I want to label pages by date. There's a series of screenshots at http://www.flickr.com/photos/21409...@n08/ to show what I mean. If I expect lots of search results in a field to be identical,

[Rails] Re: A few questions before i start to programm

2010-05-27 Thread Roelof Wobben
Hello, To make it more clear. What I have in mind is this: Make a application with a menu which contains a input choice and a rankings choice. If the user chooses for input the user gets a form so the data can be in the database. If the user chooses for rankings the followrig occurs. Every

Re: [Rails] Safebuffer with rails 2.3.8

2010-05-27 Thread Loïc Guitaut
Found it! It was a problem with fckeditor plugin. Le mercredi 26 mai 2010 11:21:41, Loïc Guitaut a écrit : Hi there! I've just migrated from rails 2.3.5 to 2.3.8 and now I have a lot (and I mean a lot!) of deprecation warnings like this one: DEPRECATION WARNING: ActionView::SafeBuffer is

[Rails] [JOBS] - Looking for Ruby on Rails professionals for Delhi, India

2010-05-27 Thread Indranil
Hi, We are looking for strong LAMP/Ruby on Rails candidates for one of our multinational clients (a product company) who are looking to setup a development center in Delhi/NCR. Openings are for Technical Leads, Senior Developers and Developers. Remuneration would be one of the best in the

[Rails] How to have *_url generate urls with https:// protocol

2010-05-27 Thread Errol Siegel
Hello, I accidentally posted this to the Ruby forum when it should have gone here -- sorry. I am using *_path in views and *_url in controllers (with redirect_to, for example). It is my understanding that this is generally considered a good practice. I want to use my app using https, and

[Rails] Clarification on PayPal gateways!!!

2010-05-27 Thread sathishkumar
Hi All, I need suggestions and helps from PayPal (PP) users and developers to clarify about PP gateways. We need to implement PP payment gateway for money transactions between two users in our site. We need to accept payments in two ways; 1) From PP a/c. to PP a/c 2) From Credit card to PP

[Rails] Re: URGENT + production migrations

2010-05-27 Thread anon_comp
I know this has already been resloved, but instead of creating a new migration, you could have gone back to version 0 rake db:migrate VERSION=0 then run rake db:migrate this should update all migrations you edited. On May 27, 6:55 am, Andy Jeffries a...@andyjeffries.co.uk wrote: I edited

Re: [Rails] Re: URGENT + production migrations

2010-05-27 Thread Andy Jeffries
On 27 May 2010 15:15, anon_comp neocools...@gmail.com wrote: I know this has already been resloved, but instead of creating a new migration, you could have gone back to version 0 rake db:migrate VERSION=0 then run rake db:migrate this should update all migrations you edited. The downside

[Rails] Re: URGENT + production migrations

2010-05-27 Thread anon_comp
The downside is that migrations will often have a create_table in the up method and a drop_table in the down method.  As Hemant said this was on a production system, doing as you suggest would lose all his live/production data. Probably not the solution he'd desire :-) Point taken :) --

[Rails] HTML character codes in ActionMailer subject

2010-05-27 Thread jhaagmans
Hi, We have our e-mail subjects stored in I18n locale files. For the English version of the website, we had no problem, but now we're translating to German, which uses a lot of symbols like uuml; and Uuml; for example. We store them as character codes in the YAML files, but most e-mail clients

[Rails] Validating and using Kernal.System

2010-05-27 Thread anon_comp
Ok so I have a RoR project that seems to be...unconventional lol I'm attempting to validate the name of the file and using Kernal.System to input the file in the system as a parameter. I've tried validates_presence_of, but that doesn't appear to work unless in a model which I don't have. I'm

[Rails] Re: Rails 3 Error:uninitialized constant ActiveResource::Base

2010-05-27 Thread Felipe Orellana Castillo
well... finally i installed the ruby head-version, and all the little problems that i had were solved, try that On May 24, 9:06 am, Felipe Orellana Castillo forellanc...@gmail.com wrote: I have the same trouble, but using the ruby 1.9.1 it's a kind of bug? -- You received this message

[Rails] Is using script/console in live production environment ok?

2010-05-27 Thread james
I need to make some minor record changes in the database on my live production site. I use Capistrano to deploy. I know I can activate script/console by entering my /current Capistrano directory and running: RAILS_ENV=production script/console Are there any dangers or pitfalls to be aware of

Re: [Rails] Is using script/console in live production environment ok?

2010-05-27 Thread Andy Jeffries
On 27 May 2010 15:45, james hindle.ja...@gmail.com wrote: I need to make some minor record changes in the database on my live production site. I use Capistrano to deploy. I know I can activate script/console by entering my /current Capistrano directory and running: RAILS_ENV=production

[Rails] add textbox dymamically

2010-05-27 Thread Ravi Dtv
Hii I need to add textbox dynamically when I click Add button. On clicking on button the textboxes are to be displayed one below the other. I enter different text in different textboxes, when clicked submit button all the content in all the textboxes should be saved. How can I achive this

Re: [Rails] add textbox dymamically

2010-05-27 Thread Hassan Schroeder
On Thu, May 27, 2010 at 8:04 AM, Ravi Dtv li...@ruby-forum.com wrote: I need to add textbox dynamically when I click Add button. How can I achive this functionality? A client-side action like this is done with JavaScript. A JS library like Prototype or jQuery can be helpful, but you still

Re: [Rails] Validating and using Kernal.System

2010-05-27 Thread Colin Law
On 27 May 2010 15:43, anon_comp neocools...@gmail.com wrote: Ok so I have a RoR project that seems to be...unconventional lol I'm attempting to validate the name of the file and using Kernal.System to input the file in the system as a parameter. I've tried validates_presence_of, but that

Re: [Rails] add textbox dymamically

2010-05-27 Thread Colin Law
On 27 May 2010 16:35, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Thu, May 27, 2010 at 8:04 AM, Ravi Dtv li...@ruby-forum.com wrote: I need to add textbox dynamically when I click Add button. How can I achive this functionality? A client-side action like this is done with

Re: [Rails] add textbox dymamically

2010-05-27 Thread Hassan Schroeder
On Thu, May 27, 2010 at 9:09 AM, Colin Law clan...@googlemail.com wrote: A client-side action like this is done with JavaScript. Or AJAX could be used. Which is still JavaScript, but with a pointless (in this case) round-trip to the server :-) -- Hassan Schroeder

[Rails] Re: Is using script/console in live production environment

2010-05-27 Thread Marnen Laibow-Koser
Andy Jeffries wrote: On 27 May 2010 15:45, james hindle.ja...@gmail.com wrote: I need to make some minor record changes in the database on my live production site. I use Capistrano to deploy. I know I can activate script/console by entering my /current Capistrano directory and running:

[Rails] Re: HTML character codes in ActionMailer subject

2010-05-27 Thread Marnen Laibow-Koser
Jaap Haagmans wrote: Hi, We have our e-mail subjects stored in I18n locale files. For the English version of the website, we had no problem, but now we're translating to German, which uses a lot of symbols like uuml; and Uuml; for example. We store them as character codes in the YAML

Re: [Rails] add textbox dymamically

2010-05-27 Thread Colin Law
On 27 May 2010 17:20, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Thu, May 27, 2010 at 9:09 AM, Colin Law clan...@googlemail.com wrote: A client-side action like this is done with JavaScript. Or AJAX could be used. Which is still JavaScript, but with a pointless (in this case)

Re: [Rails] How to have *_url generate urls with https:// protocol

2010-05-27 Thread Philip Hallstrom
Hello, I accidentally posted this to the Ruby forum when it should have gone here -- sorry. I am using *_path in views and *_url in controllers (with redirect_to, for example). It is my understanding that this is generally considered a good practice. I want to use my app using https,

Re: [Rails] add textbox dymamically

2010-05-27 Thread Hassan Schroeder
On Thu, May 27, 2010 at 9:35 AM, Colin Law clan...@googlemail.com wrote: It is probably correct that the round trip to the server is pointless, but not necessarily, we do not know enough about the requirement. Maybe the text boxes to be added depend on data the user has entered and in data in

[Rails] collection.last does not seem to jive with collection.count after collection.build

2010-05-27 Thread Dee
I was just trying to write a smart copy method in a class* and noticed that the last and count collection methods don't work the same after build and before save. In other words, if in my code I do this: user = User.new user.save purchase = user.purchases.build Then I get the

[Rails] Re: Is using script/console in live production environment ok?

2010-05-27 Thread chris
If you are using SQLite make sure you run under same UID as passenger/ fastcgi/mongrel/etc On May 27, 10:45 am, james hindle.ja...@gmail.com wrote: I need to make some minor record changes in the database on my live production site. I use Capistrano to deploy. I know I can activate

[Rails] Re: Validating and using Kernal.System

2010-05-27 Thread anon_comp
In essence yes, but the user input is just an added command that won't do anything if they don't have a log file, or the rather, the correct log format. I'm mostly using this for personal use and am totally aware that it's incredibly dangerous. I just can't think of another way to do this. On May

[Rails] Re: How to have *_url generate urls with https:// protocol

2010-05-27 Thread Errol Siegel
I assume you meant to say http://; ? Yes! I thought I proof-read so well... How do I get *_url to generate a url with https:// for the protocol? some_model_url(:scheme = 'https') Thanks for the response. I guess I was looking for a way to do this application-wide. It would not be very

Re: [Rails] Re: Validating and using Kernal.System

2010-05-27 Thread Colin Law
On 27 May 2010 18:07, anon_comp neocools...@gmail.com wrote: In essence yes, but the user input is just an added command that won't do anything if they don't have a log file, or the rather, the correct log format. I'm mostly using this for personal use and am totally aware that it's incredibly

[Rails] Ajax submit: Clicking 'Submit' vs. hitting ENTER

2010-05-27 Thread Tom Ha
Hi there, Has anyone an idea why the below form - submits correctly when I click the 'Submit' button - but does call the 'new' action instead of 'create' when I hit ENTER? % form_remote_tag :html = { :action = url_for(:controller = 'pages',

[Rails] Re: Validating and using Kernal.System

2010-05-27 Thread anon_comp
On May 27, 1:19 pm, Colin Law clan...@googlemail.com wrote: Could you not top post please, it makes it easier to follow the thread if you insert your replies inline. Sorry about that So what exactly is the problem then?  First look in the log file (log/development.log) and see if the

[Rails] Handling custom error files (404/500) in Rails 3

2010-05-27 Thread anywho
I've been looking at rescue_from and rescue_action_in_public however, none of them have worked without making a catch-all route. So currently, my solution is to use the catch-all route: match '*path' = controller#action # custom 404 which then renders a 404 with the appropriate layout whether

[Rails] Re: Validating and using Kernal.System

2010-05-27 Thread anon_comp
On May 27, 1:27 pm, anon_comp neocools...@gmail.com wrote: So what exactly is the problem then?  First look in the log file (log/development.log) and see if the parameter is being passed correctly when they submit.  If this is ok what do you want to do with his input? The parameters

Re: [Rails] Re: How to have *_url generate urls with https:// protocol

2010-05-27 Thread Philip Hallstrom
On May 27, 2010, at 10:11 AM, Errol Siegel wrote: I assume you meant to say http://; ? Yes! I thought I proof-read so well... How do I get *_url to generate a url with https:// for the protocol? some_model_url(:scheme = 'https') Thanks for the response. I guess I was looking for a

[Rails] has_many :through association not working properly

2010-05-27 Thread chewmanfoo
ISSUE: The host has 3 ip addresses on two networks (#62 is repeated) How do I get host.networks to return only the two networks? host = #NetworkHost id: 923, name: ota-app1, os_id: 1, feature_id: nil, description: nil, created_at: 2010-05-18 19:05:49, updated_at: 2010-05-18 19:05:49, ip_id: nil,

[Rails] Re: add textbox dymamically

2010-05-27 Thread chewmanfoo
http://railscasts.com/episodes/75-complex-forms-part-3 that might help On May 27, 10:04 am, Ravi Dtv li...@ruby-forum.com wrote: Hii I need to add textbox dynamically when I click Add button. On clicking on button the textboxes are to be displayed one below the other. I enter different

Re: [Rails] Safebuffer with rails 2.3.8

2010-05-27 Thread Rafael Coelho de Souza
And what was the problem? I'm having the same issue. Best, Rafael On Thu, May 27, 2010 at 9:33 AM, Loïc Guitaut fl...@belfalas.org wrote: Found it! It was a problem with fckeditor plugin. Le mercredi 26 mai 2010 11:21:41, Loïc Guitaut a écrit : Hi there! I've just migrated from rails

[Rails] Re: Re: How to have *_url generate urls with https:// protocol

2010-05-27 Thread Errol Siegel
Use *_path? I do it and haven't seen any browsers complain about the redirects... Again, that would mean going through the entire application and changing every reference. Besides, using relative paths in redirects violates the HTTP spec. I understand that it gets the job done, but that

[Rails] [JOBS] SCEA San Diego

2010-05-27 Thread Emanuele MEK Tozzato
Are you interested in a Ruby on Rails position at Sony Computer Entertainment America LLC? Working here is really great, I promise! Position Overview: Support PlayStation Online Games by developing and supporting in production a high complexity, service oriented application that offers online

[Rails] Re: Accessing session data from a background worker

2010-05-27 Thread Jeff Lewis
Not sure what you are attempting to accomplish in those background threads/processes, or what the reasoning is behind even using multiple background threads/processes in the first place in light of what you seem to be trying to do, but the basic strategy you're attempting to pursue where you have

[Rails] Re: Can I get meaningful page links using will_paginate?

2010-05-27 Thread Ron Phillips
Well, I still think it's silly to make users play guess the page number, so here's how you can make nicely labeled page links with Paginator. In your controller: http://pastie.org/980498 and in your view: http://pastie.org/980519 Perhaps this isn't so easy using will_paginate. So, another

[Rails] Re: [JOBS] Ruby help needed for misc. issues

2010-05-27 Thread AdamPHX
Kanaav: Thanks for the response. What are your rates, and how much time would it take to do this? Also, is there any warranty on the work for bugs fixes, etc., if needed? Adam On May 26, 10:03 pm, kannav rajeev rajeevsharm...@gmail.com wrote: *I can surely do these *- Resolving any IE 8

[Rails] Re: collection.last does not seem to jive with collection.count after collection.build

2010-05-27 Thread Jeff
On May 27, 11:47 am, Dee dger...@gmail.com wrote: I was just trying to write a smart copy method in a class* and noticed that the last and count collection methods don't work the same after build and before save. In other words, if in my code I do this:     user = User.new     user.save    

[Rails] Re: Validating with Encryption

2010-05-27 Thread Robert Walker
tashfeen.ekram wrote: hmmm ok. i was using strongbox gem. what you recommends seems like it would work if i wrote my own encryption. i think the encryption in the gem is carried out prior to validation. is there another way in which i can still use strongbox? I've not looked at the

Re: [Rails] Re: Validating and using Kernal.System

2010-05-27 Thread Colin Law
On 27 May 2010 18:32, anon_comp neocools...@gmail.com wrote: On May 27, 1:27 pm, anon_comp neocools...@gmail.com wrote: So what exactly is the problem then?  First look in the log file (log/development.log) and see if the parameter is being passed correctly when they submit.  If this is

Re: [Rails] Ajax submit: Clicking 'Submit' vs. hitting ENTER

2010-05-27 Thread Colin Law
On 27 May 2010 18:24, Tom Ha li...@ruby-forum.com wrote: Hi there, Has anyone an idea why the below form - submits correctly when I click the 'Submit' button - but does call the 'new' action instead of 'create' when I hit ENTER? % form_remote_tag :html = { :action = url_for(:controller =

[Rails] before_filter always running in test, not in development or production mode.

2010-05-27 Thread John Postlethwait
I'm using Shoulda and restful_authentication on Rails3 and whenever I run my tests a before filter for login_required is always triggered, despite my filter being set up as: before_filter :login_required, :only = [:update, :edit, :suspend, :unsuspend, :destroy, :purge] My test is this:

[Rails] Re: Validating and using Kernal.System

2010-05-27 Thread anon_comp
On May 27, 3:53 pm, Colin Law clan...@googlemail.com wrote: On 27 May 2010 18:32, anon_comp neocools...@gmail.com wrote: On May 27, 1:27 pm, anon_comp neocools...@gmail.com wrote: So what exactly is the problem then?  First look in the log file (log/development.log) and see if

[Rails] Re: Validating with Encryption

2010-05-27 Thread tashfeen.ekram
hmmm. what you mention does make sense. perhaps i will roll my own. however, i would like to completely understand. so, ideally the encryption should work such that all of the active record attributes work as expected. when retrieving an attribute you would get the expected object. i dont have

[Rails] Re: collection.last does not seem to jive with collection.count after collection.build

2010-05-27 Thread Dee
Thanks, Jeff. Thanks for the clarification of the difference between .size and .count. I was actually looking more for something that does .last like .count, rather than .count like .last. I got around that by doing and :order_by = 'created_at' before using .last, which puts the nils at the head,

[Rails] Re: Validating with Encryption

2010-05-27 Thread Robert Walker
tashfeen.ekram wrote: hmmm. what you mention does make sense. perhaps i will roll my own. however, i would like to completely understand. so, ideally the encryption should work such that all of the active record attributes work as expected. when retrieving an attribute you would get the

Re: [Rails] has_many :through association not working properly

2010-05-27 Thread Hassan Schroeder
On Thu, May 27, 2010 at 10:41 AM, chewmanfoo chewman...@gmail.com wrote: ISSUE: The host has 3 ip addresses on two networks (#62 is repeated) How do I get host.networks to return only the two networks? ## network_hosts model class NetworkHost ActiveRecord::Base  has_many :ip_addresses,

[Rails] Re: has_many :through association not working properly

2010-05-27 Thread chewmanfoo
Yes! that's it! thanks! On May 27, 4:14 pm, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Thu, May 27, 2010 at 10:41 AM, chewmanfoo chewman...@gmail.com wrote: ISSUE: The host has 3 ip addresses on two networks (#62 is repeated) How do I get host.networks to return only the two

Re: [Rails] Ajax submit: Clicking 'Submit' vs. hitting ENTER

2010-05-27 Thread Hassan Schroeder
On Thu, May 27, 2010 at 1:03 PM, Colin Law clan...@googlemail.com wrote: Assuming html is valid is it possible that Enter is hitting a different button or link on the page?  Does the log give any clues? Besides the above, use FF/Firebug to 1) confirm there are no JavaScript errors occurring

[Rails] Re: Ajax submit: Clicking 'Submit' vs. hitting ENTER

2010-05-27 Thread Frederick Cheung
On May 27, 6:24 pm, Tom Ha li...@ruby-forum.com wrote: Hi there, Has anyone an idea why the below form - submits correctly when I click the 'Submit' button - but does call the 'new' action instead of 'create' when I hit ENTER? % form_remote_tag :html = { :action = url_for(:controller =

[Rails] Re: Re: How to have *_url generate urls with https:// proto

2010-05-27 Thread Marnen Laibow-Koser
Errol Siegel wrote: Use *_path? I do it and haven't seen any browsers complain about the redirects... Again, that would mean going through the entire application and changing every reference. Besides, using relative paths in redirects violates the HTTP spec. I understand that it gets

[Rails] Creating a report generator within a mysql database to be read on rails.

2010-05-27 Thread jraglin
Hello, My issue is that I am creating a database in MySQL and needing to export the information in automatically generated reports (.csv), into a web application written in Rails. Does anyone have any advice or tutorial links as to how I may do this? Or whether Rails or MySQL have a preferably

[Rails] Re: Using update_attributes(params[:something]) w/ manual assignment

2010-05-27 Thread Jose Ambros-ingerson
Perry Smith wrote: By the way, update_attributes calls save (as of 2.3.2? or was it before that) only if at least one attribute has changed. It appears to me that this is not true. I tried it below using 2.3.5. As you can see the 'locale' attribute was es and it got updated to es anyway.

[Rails] Re: Creating a report generator within a mysql database to b

2010-05-27 Thread Marnen Laibow-Koser
jraglin wrote: Hello, My issue is that I am creating a database in MySQL and needing to export the information in automatically generated reports (.csv), into a web application written in Rails. Well, you can generate the CSV files with MySQL's export feature and read them with FasterCSV.

[Rails] Re: before_filter always running in test, not in development or production mode.

2010-05-27 Thread John Postlethwait
This is apparently not related to Shoulda... This test also fails using Test::Unit by itself: test 'A guest on GET to #show' do get :show, { :id = users(:alexander).id } assert flash.empty? assert_not_nil assigns(:user) assert_response :success end Failure: 1) Failure:

[Rails] Re: Using update_attributes(params[:something]) w/ manual assignment

2010-05-27 Thread Jose Ambros-ingerson
Jose Ambros-ingerson wrote: Perry Smith wrote: By the way, update_attributes calls save (as of 2.3.2? or was it before that) only if at least one attribute has changed. Though failure to behave this way (see above) is hurting me; I have an observer that get's triggered on the save, but

Re: [Rails] Safebuffer with rails 2.3.8

2010-05-27 Thread Loïc Guitaut
It's with the javascript include in lib/fckeditor.rb. Just comment out all the module ActionView::Helpers::AssetTagHelper block and include fckeditor.js as you do with another JS file. You'll get rid of those deprecation warnings :) Le jeudi 27 mai 2010 20:05:06, Rafael Coelho de Souza a écrit

[Rails] Re: Using update_attributes(params[:something]) w/ manual assignment

2010-05-27 Thread Perry Smith
Jose Ambros-ingerson wrote: Jose Ambros-ingerson wrote: Perry Smith wrote: By the way, update_attributes calls save (as of 2.3.2? or was it before that) only if at least one attribute has changed. Though failure to behave this way (see above) is hurting me; I have an observer that

[Rails] Re: before_filter always running in test, not in development or production mode.

2010-05-27 Thread John Postlethwait
I found a way around this, though I still have no clue why this works: In my controller, if I add: def show end The before filter DOES NOT run, as I expect, as soon as I remove the def show;end the filter is once again applied to the #show action. Is this a Rails3 bug? -John On May 27, 3:27 

[Rails] UTF8 name not carried into the page cache filename

2010-05-27 Thread dave4...@greatchiro.com
I am using ruby 1.8.7 and rail 3 beta3 on Windows XP. Page caching works okay and the content of the cache is UTF8 as expected. However, the filename which came from the UTF8 URL is not okay. Apache can not find the file because it is not filed as a UTF8 filename but something else. I do not

[Rails] Re: Rails 3 telling me route doesn't exist

2010-05-27 Thread genki...@gmail.com
Dude, it's new_category_subcategory_path(@category), you missed a _path -- 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 this group, send email to

[Rails] Re: Rails 3 telling me route doesn't exist

2010-05-27 Thread Adam Leonard
genki...@gmail.com wrote: Dude, it's new_category_subcategory_path(@category), you missed a _path Yeah I found out today, I feel really stupid :/ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Why was overwrite_params deprecated in Rails 3?

2010-05-27 Thread Ryan Michael
As far as I can tell there's no 'preferred' way to do this instead of using overwrite_params and this is extrememly usefuly in situations where it's hard to know exactly which parameters will be set in a view (for instance filtering a few of multiple options using query string params). -- You

[Rails] Rails and JSON example?

2010-05-27 Thread Ralph Shnelvar
Does anyone know of a demo or tutorial in which ... (1) In a browser some data is packaged up using JSON. (2) an async request is sent to a rails app sending the JSON data. I would like this to be done via jQuery. (3) A rails app deserializes the JSON data. (4) The Rails app then packages up

[Rails] Re: add textbox dymamically

2010-05-27 Thread Ravi Dtv
chewmanfoo wrote: http://railscasts.com/episodes/75-complex-forms-part-3 that might help Thanks chewmanfoo, this is what the functionality Im looking for. Thanks all for replying. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Re: HTML character codes in ActionMailer subject

2010-05-27 Thread jhaagmans
We have our e-mail subjects stored in I18n locale files. For the English version of the website, we had no problem, but now we're translating to German, which uses a lot of symbols like uuml; and Uuml; for example. We store them as character codes in the YAML files, Why?  That's a

[Rails] Re: Rails 3 Error:uninitialized constant ActiveResource::Base

2010-05-27 Thread DmitryPush
Thx! -- 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 this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options,

  1   2   >