Re: [Rails] Re: Really need help with gems not being found

2010-10-05 Thread Colin Law
On 6 October 2010 02:08, omnivore wrote: > Solution was simple, once I found it. Change the bang line in the > rake.rb, found via 'which rake' to point to the ruby version that > houses the gems. Now things work. Don't bother thanking anyone for pointing you at the cause of the problem. They are

[Rails] Error customization problem.

2010-10-05 Thread Sunny Bogawat
Hi, I have following models class User < ActiveRecord::Base has_many:addresses, :as =>:addressee, :dependent => :destroy accepts_nested_attributes_for :addresses, :allow_destroy => true end class Address < ActiveRecord::Base belongs_to :addressee, :polymorphic => true validates_pres

Re: [Rails] Immediate opening for a skilled RoR developer

2010-10-05 Thread Colin Law
On 5 October 2010 23:31, northband wrote: > Seeking honest, efficient, and productive candidates. No-one dishonest, inefficient or non-productive need apply then? What a surprise. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.

[Rails] How mongrel Temorary files is generated

2010-10-05 Thread Amit Tomar
Hii all , mongrel1.1.2 ruby 1.8.6 apche 2.2.16 i am running Apche frontend to mongrel and trying to upload some large file(from rails application) to filesystem.Few things i observed. 1 - The uploaded data is stored in a file "mongrel.4124.0" 2 - the mongrel file is copied to a CGI.4124.0 file

[Rails] Re: Rails 3 generate model

2010-10-05 Thread Frederick Cheung
On Oct 5, 10:25 pm, hal wrote: > I have done it before with an earlier version of rails eg : > > Rails::Generator::Scripts::Generate.new.run(['model',@name]) > > but I am not sure of  the command in Rails 3, and the 'require' > statements to ensure I won't get any 'no such file errors'. > > The

[Rails] Error on running unity test: "no such file to load -- 'active_record/version'"

2010-10-05 Thread Fabrício Dias
Hi folks! I've been experimenting an error messagem when I try to run unity test in any model of my project. Here it is: /home/fabricio/shopcell/config/environment.rb:1:in `require': no such file to load -- active_record/version (LoadError) from /home/fabricio/shopcell/config/environment

[Rails] Rails 3 generate model

2010-10-05 Thread hal
Hello, I would like to generate a model through my rails 3 application. Eg I can type: rails g model Abc at the command line. I want to do the same through my application. I have done it before with an earlier version of rails eg : Rails::Generator::Scripts::Generate.new.run(['model',@name]) b

[Rails] Re: Problem writing to database using form_for

2010-10-05 Thread Jim Burgess
> validate do |applicant| > errors.add_to_base("Things must check out!") unless > applicant.check_things > end > > def before_save > applicant.non_represented_field = 123456789 > end > > before_save will only be called if your validations pass, so > non_represented_field will only be assig

[Rails] Re: Gem::FilePermissionError

2010-10-05 Thread Arivarasan Lingasamy
nice, now it works... Thanks, L. Arivarasan -- 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 this group

Re: [Rails] Mailing labels

2010-10-05 Thread Walter Lee Davis
CSS floats, maybe? DIV (page width) DIV (float left, label width) DIV (float left, label width) DIV (float left, label width) DIV (float left, label width) DIV (float left, label width) DIV (float left, label width) DIV (float left, label width) DIV (float left, label width) DIV (float left

[Rails] Mailing labels

2010-10-05 Thread Bob Smith
Any easy way to print on mailing labels that have 3 columns? I need these to fit in my laser printer. I have no trouble with single column labels, but I don't know how to make a partial display 3 times across a page with different records. Thanks Bob -- You received this message because you ar

Re: [Rails] Problem writing to database using form_for

2010-10-05 Thread Luke Cowell
How about this ? validate do |applicant| errors.add_to_base("Things must check out!") unless applicant.check_things end def before_save applicant.non_represented_field = 123456789 end before_save will only be called if your validations pass, so non_represented_field will only be assigned to

Re: [Rails] Re: what is that get in routes?

2010-10-05 Thread Luke Cowell
It just means that it's a GET request from your browser as opposed to POST, PUT, or DELETE http methods. For example: GET would be used when you want to simply load a page, POST would be used if you wanted to submit a form. This is all pretty well documented in the rails guides: http://guides.ru

[Rails] Re: How RoR handles multiple sub-websites under one host?

2010-10-05 Thread crab
Hi Marnen, > > My question is, how can I start one "ruby server" and use one config > > for multiple sub-websites? > > You normally wouldn't want to, if they're completely separate Rails > apps.  If they don't share data or anything, they should be independent > Rails applications running on separ

Re: [Rails] Re: Is it possible to query on virtual attributes?

2010-10-05 Thread Walter Lee Davis
In straight SQL you could order on the full name by using SELECT *, CONCAT(first_name, ' ', last_name) AS full_name FROM people ... ORDER BY full_name ASC. See if you can work that into a Rails finder syntax. Walter On Oct 5, 2010, at 4:41 PM, Marnen Laibow-Koser wrote: Clay H. wrote: I

[Rails] jquery.fancybox not working with rajs template

2010-10-05 Thread nirosh
im using jquery.fancybox to display flv videos. the video has many categories. so i have written a AJAX function to switch the categories. when i load the page the jquery.fancybox works perfectly. if i switch the category with AJAX call that dosent work. NAy body have any idea about this??? --

[Rails] Re: Really need help with gems not being found

2010-10-05 Thread omnivore
Solution was simple, once I found it. Change the bang line in the rake.rb, found via 'which rake' to point to the ruby version that houses the gems. Now things work. Put differently, now its not broken. The breakage came as a result of Rails using the $PATH variable when installing gems, not when

[Rails] Immediate opening for a skilled RoR developer

2010-10-05 Thread northband
Seeking honest, efficient, and productive candidates. Located in the Detroit, MI area, however will consider telecommute based upon communication and performance. We are only looking for candidates that can deliver the goods. Please send resume, experience/samples of your work. Contact Adam ~ nort

[Rails] replacing ActionController::Routing::RouteSet::Mapper.send

2010-10-05 Thread apneadiving
Hi there, I'm following http://edgeguides.rubyonrails.org/plugins.html and at chapter 8, I'm told to add: ActionController::Routing::RouteSet::Mapper.send :include, Yaffle::Routing::MapperExtensions In order to add the routes of my plugin in my Rails app... Unfornately, ActionController::Routing

Re: [Rails] rake and stderr

2010-10-05 Thread Jeffrey L. Taylor
Quoting Jonathan Rochkind : > Why can't I get a rake task to write to stderr? > > warn "something" > $stderr.puts "something" > What about: STDERR.puts "something" HTH, Jeffrey -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To pos

[Rails] rake and stderr

2010-10-05 Thread Jonathan Rochkind
Why can't I get a rake task to write to stderr? warn "something" $stderr.puts "something" Both result in no output in my console. Anyone know what's up? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: Problem writing to database using form_for

2010-10-05 Thread Jim Burgess
Radhames Brito wrote: > save it in the session hash on validation Hi, Thanks for the reply. Did I understand you correctly, that you are suggesting setting a session variable in the model (where my validation is taking place) which I can then pass to the controller? I didn't know that that wa

[Rails] Re: How RoR handles multiple sub-websites under one host?

2010-10-05 Thread Marnen Laibow-Koser
crab wrote: [...] > My question is, how can I start one "ruby server" and use one config > for multiple sub-websites? You normally wouldn't want to, if they're completely separate Rails apps. If they don't share data or anything, they should be independent Rails applications running on separate

[Rails] Re: Really need help with gems not being found

2010-10-05 Thread Marnen Laibow-Koser
omnivore wrote: > I love Rails, but I'm beginning to think that there are some very > broken things about it. [...] As Fred said, Rails isn't broken. Your Ruby installation is. Next time, ask for help without creating FUD. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org --

[Rails] Re: Really need help with gems not being found

2010-10-05 Thread Frederick Cheung
On Oct 5, 7:39 pm, omnivore wrote: > I love Rails, but I'm beginning to think that there are some very > broken things about it. Case in point: > > - I'm on OS X, and at some point added rails using MacPorts, putting > most of my gems in /opt/local/lib/ruby/gems/1.8 > > - when I add gems, they a

[Rails] Re: What is the best column time to store amount of hours

2010-10-05 Thread Marnen Laibow-Koser
Leonel Leonel wrote: > For example, if I want to store the amount of hours a service takes to > complete such as... > > 1 hour of consulting > 2 hours of consulting > 3 hours of consulting > > 1 hour swedish massage > 1.5 hours swedish massage > > If it was all whole hours I could just use integ

Re: [Rails] What is the best column time to store amount of hours

2010-10-05 Thread Michael Pavling
On 5 October 2010 22:06, Leonel Leonel wrote: > If it was all whole hours I could just use integer, but note I also need > it for half hours. Store minutes, and use an integer field? In your model divide by 60 in the getter, and multiply by 60 in the setter (or expect minutes as the parameter) to

[Rails] Really need help with gems not being found

2010-10-05 Thread omnivore
I love Rails, but I'm beginning to think that there are some very broken things about it. Case in point: - I'm on OS X, and at some point added rails using MacPorts, putting most of my gems in /opt/local/lib/ruby/gems/1.8 - when I add gems, they are added in that directory BUT - when I run (eg)

[Rails] Ruby with apache ActionController::RoutingError (No route matches "/"):

2010-10-05 Thread Jonas
Hi! I an trying to setup ruby on rails with apache server on ubuntu server 10.04. I have followed toe guid on the ubuntu page. My main app is located in: /home/jonas/ruby/apps/rtest1/public and I created a symlink to /var/www/app using the following command: sudo ln -s /home/jonas/ruby/apps/rt

[Rails] How RoR handles multiple sub-websites under one host?

2010-10-05 Thread crab
Hi there. I am trying out Rails and would like to get some advice on this topic. In my workplace, we are using IIS as web server. And we usually create folders under root as sub-websites. For example: http://my.web.site/sub_web_1/index.html http://my.web.site/sub_web_2/index.html (and so on...)

Re: [Rails] Re: Re: wkhtmltopdf and PDFkit

2010-10-05 Thread David Kahn
Yeah, that does work, but if you do it with the tr, it will do it on every tr --- so you get a lot of pages! I think what I did was in my logic is judiciously add the page break css when I am approaching a certain # of lines. Guess it just depends on what you are trying to do. Best! David On Tue

[Rails] What is the best column time to store amount of hours

2010-10-05 Thread Leonel Leonel
For example, if I want to store the amount of hours a service takes to complete such as... 1 hour of consulting 2 hours of consulting 3 hours of consulting 1 hour swedish massage 1.5 hours swedish massage If it was all whole hours I could just use integer, but note I also need it for half hours.

[Rails] Re: Re: wkhtmltopdf and PDFkit

2010-10-05 Thread Conor Nugent
Yeah, I'm really looking forward to playing around with it and thanks again for your help. Ryan Bates mentions a css solution to the problem you have described in his railscast. Basically involves using page-break-before: always; for the items you don't want split Here is the ascii version of

Re: [Rails] Problem writing to database using form_for

2010-10-05 Thread radhames brito
save it in the session hash on validation and delete it from the session hash after the save. if validations fails, try to find the value on the session and putting it in the controller. Since validation will trigger again in a second submit, also look for the value in the session hash before setti

Re: [Rails] Re: Rspec .should == true does not seem to work

2010-10-05 Thread David Kahn
> You normally want to use .should be_true (and .should be_false). Right, I just changed things back but now get this error: undefined local variable or method `be_true' for # (NameError) Now, if I do it with .should == true, I have verified that the problem is that this test is failing: user.

[Rails] Problem writing to database using form_for

2010-10-05 Thread Jim Burgess
Hi, I have a web-based form for applicants to enter their details, created using form_for :applicant There is one field in the corresponding applicants table of my database which is not represented in the form. I want to set the value of this field in the model (it should be an unique hash). Wh

Re: [Rails] Re: how to access the contents of a field

2010-10-05 Thread radhames brito
Whenever you have a page that sends confidential information back and forth you have to encrypt it, because when a user hits submit, the html goes back to the server in pure text and can be read by anyone along the way to the server. What is done is that PKI infrastructure is used to ensure no one

[Rails] Re: Is it possible to query on virtual attributes?

2010-10-05 Thread Marnen Laibow-Koser
Clay H. wrote: > I have a Person model with attributes first_name and last_name. > > I want to implement autocomplete search that looks that the entire > name. Hence I have a method: > > def full_name >self.first_name + " " + self.last_name > end > > Is it possible for me to query on full_na

Re: [Rails] Re: wkhtmltopdf and PDFkit

2010-10-05 Thread David Kahn
Great! Really like wkhtmltopdf, the only thing which I really hope they improve soon is pagination as I found that my tr's were getting cut off mid row if they coincided with the bottom of a page, ended up writing manual logic to handle pagination. David On Tue, Oct 5, 2010 at 3:37 PM, Conor Nuge

[Rails] Re: Rspec .should == true does not seem to work

2010-10-05 Thread Marnen Laibow-Koser
David Kahn wrote: > I have a function that returns the true / false Ruby type. For some > reason I > cant get rspec to swallow this. > > This errors out: > user.authorize.should == true [...] You normally want to use .should be_true (and .should be_false). Best, -- Marnen Laibow-Koser http://ww

[Rails] Re: wkhtmltopdf and PDFkit

2010-10-05 Thread Conor Nugent
Hi David, Thanks you so much for your reply. My development environment is snow leopard and then I deploy to a ubuntu server. To be honest I'm just trialling stuff at moment but strangely ran into problems getting things working on snow leopard. I actually figured out what was going on but

[Rails] Is it possible to query on virtual attributes?

2010-10-05 Thread Clay H.
I have a Person model with attributes first_name and last_name. I want to implement autocomplete search that looks that the entire name. Hence I have a method: def full_name self.first_name + " " + self.last_name end Is it possible for me to query on full_name and have rails match the first_n

Re: [Rails] Re: update the content of a column in a BD table

2010-10-05 Thread Felix Schäfer
Am 05.10.2010 um 22:11 schrieb abdelkrim fitouri: > any help please ? What have you already tried? Have you read or tried some tutorials or guides? People here are most willing to help you when you are stuck but have already been trying on your own to find a solution, coming here as soon as s

[Rails] Re: how to access the contents of a field

2010-10-05 Thread abdelkarim
thanks all :) but i dont have any idea about using ssl :( On 20 sep, 07:10, radhames brito wrote: > dont forget to user ssl -- 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...@googlegro

[Rails] Re: update the content of a column in a BD table

2010-10-05 Thread abdelkrim fitouri
any help please ? thanks 2010/9/28 abdelkarim > hello every body , ( i am new in ROR ) > > i have a form with a password field to update the password of the user > admin . > > please how can i update the column with the content of the field ? > > ch1=params[:pass1] > > > thanks a lot ! > > > >

[Rails] Re: Rspec .should == true does not seem to work

2010-10-05 Thread David Kahn
Ok, so it looks like the failure is the failure of the test, but why does rspec complain so much and not just give me a failed test and the line of failure instead of crashing? I'm pretty confused. On Tue, Oct 5, 2010 at 3:03 PM, David Kahn wrote: > I have a function that returns the true / fals

[Rails] Rspec .should == true does not seem to work

2010-10-05 Thread David Kahn
I have a function that returns the true / false Ruby type. For some reason I cant get rspec to swallow this. This errors out: user.authorize.should == true (where user.authorize in the debugger does return true so this test should succeed) With this error (this seems to be a syntax error, not

Re: [Rails] wkhtmltopdf and PDFkit

2010-10-05 Thread David Kahn
PS, I am copying the text of my blog below... may not be pretty but in there is some info on installing the static binary: title: Using wkhtmltopdf with Ruby and Rails date: 2010-09-20 description: Pdf generation with wkhtmltopdf on Rails I recently had the requirement of serving a certain report

Re: [Rails] wkhtmltopdf and PDFkit

2010-10-05 Thread David Kahn
Hi Conor - I just went through this and glad to help. I wrote a couple blog posts but it seems that my blog is having some issues so I cant give you the links. What OS are you trying to install on? What I recommend is installing the static binary. This worked for me --- just make sure it is in yo

[Rails] wkhtmltopdf and PDFkit

2010-10-05 Thread Conor Nugent
I was following along with Ryan Bates' really great railscast on PDFkit when I ran into a few problems installing wkhtmltopdf ( I also posted about my problem in the episode comments). I was wondering if anyone else has experienced similar problems or has any clues as to what is going wrong. It is

[Rails] [JOB] Ruby on Rails Engineer, NYC to 120k + Relo

2010-10-05 Thread OSS
This is a full time, on-site, salaried Ruby on Rails Engineer position located in New York City paying $90,000-120,000 depending on experience + benefits + relocation expenses if required. No telecommuting allowed. US Citizens or Green Card holders only please. Thank you. Our client operates un

Re: [Rails] Re: something is removing my whitespace

2010-10-05 Thread Luke Cowell
Try rebuilding the form without formtastic or rebuild the form with a fresh copy of rails. Are you using any javascript on the textarea ? Luke On 2010-10-05, at 9:07 AM, bingo bob wrote: > > Any ideas - something is killing the CR or newline characters ? > -- > Posted via http://www.ruby-foru

[Rails] Re: something is removing my whitespace

2010-10-05 Thread bingo bob
Any ideas - something is killing the CR or newline characters ? -- 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 unsubsc

[Rails] Re: streaming response body to client?

2010-10-05 Thread releod
I would love to hear more on this as well. Currently suffering in Rails3 due to this not having a clear solution. -- 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 u

Re: [Rails] Ajax request not coming

2010-10-05 Thread Luke Cowell
If you click on the resources tab in the developer tools and scroll to the bottom, you should see an entry for the ajax request. If you don't, the request isn't firing. If you do, the response will give you some valuable troubleshooting information. Luke On 2010-10-05, at 5:08 AM, Hemant Bharg

Re: [Rails] Re: send_file Rails3, Ruby 1.9.2

2010-10-05 Thread Luke Cowell
Are you going to make me do this for you ? ;) resources :datafiles do member do get :download end end And seriously, read this stuff: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/ http://guides.rubyonrails.org/routing.html Luke On 2010-10-05, at 7:41 AM, Smashing

[Rails] Re: send_file Rails3, Ruby 1.9.2

2010-10-05 Thread Smashing
excellent, ty On Oct 5, 9:39 am, Luke Cowell wrote: > resources :datafiles will create some default routes, but they don't include > download. You need to add a member route for the download action. > > http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/http://guides.rubyonrail

[Rails] Re: send_file Rails3, Ruby 1.9.2

2010-10-05 Thread Smashing
If I comment out everything in my index action in my datafiles_controller and paste in: send_file('/file_uploads/Productivity.pdf', :disposition => :attachment) it works, so obviously, the send_file command is good, the problem is with my routing. What do I need to add to my routes.rb file so I can

Re: [Rails] send_file Rails3, Ruby 1.9.2

2010-10-05 Thread Luke Cowell
resources :datafiles will create some default routes, but they don't include download. You need to add a member route for the download action. http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/ http://guides.rubyonrails.org/routing.html Luke On 2010-10-04, at 11:42 AM, Smashi

[Rails] Re: field_with_errors.

2010-10-05 Thread pepe
> .field_with_errors { >   display: inline; > > } > > That should do the trick. Thanks Marnen. I'll try that. -- 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 unsu

[Rails] Re: Share session between Node.js and Rails

2010-10-05 Thread Marnen Laibow-Koser
Daniel A. wrote: > Hi! > > I'm not an expert on Rails, but I've been doing some recent > development with it. Right now, I have a working app with devise for > authentication. > > Moreover, I am building a chat with Node.js and Socket.io and I wanted > to embed the client side of the Node.js app

[Rails] Re: Help with a find

2010-10-05 Thread Marnen Laibow-Koser
Pito Salas wrote: [...] > Thanks... I am not sure how to express that as Precinct.find_. can > you say? In cases like that, I usually find it helpful to write the SQL first, then transform it into ActiveRecord find syntax. > > -- pito Best, -- Marnen Laibow-Koser http://www.marnen.org m

[Rails] Re: field_with_errors.

2010-10-05 Thread Marnen Laibow-Koser
pepe wrote: >> > and if I don't want those divs? >> >> For my education, why would you object to them being there? > > Something that has bothered me from time to time is that when there > are errors the tag takes the whole line and makes the field to > end up in the next line, instead of app

[Rails] Re: Help with a find

2010-10-05 Thread Pito Salas
Frederick Cheung wrote: > On Oct 5, 2:05�pm, Pito Salas wrote: >> I have a simple one to many relation: >> >> class Precinct >> � has_many :districts >> ... >> end >> >> I would like to find all Precincts that have no districts in a finder. >> Is that possible? > > You can do that with a left out

[Rails] Re: field_with_errors.

2010-10-05 Thread Idonas
Hi, If you have your own way of handling errors in your views, you can disable rails default encapsulation by doing ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| html_tag end inside an initializer. and so no "field_with_errors" div will be wrapped around your fields.

[Rails] Re: Help with a find

2010-10-05 Thread Frederick Cheung
On Oct 5, 2:05 pm, Pito Salas wrote: > I have a simple one to many relation: > > class Precinct >   has_many :districts > ... > end > > I would like to find all Precincts that have no districts in a finder. > Is that possible? You can do that with a left outer join (and then an isnull to filter

[Rails] Looking for a passionate Ruby Developers

2010-10-05 Thread Darren Fernandes
Hello Everyone, I'm looking for passionate Ruby developers with strong over all development experience. This is a full time position with our company and you would be joining an VERY strong team of well known rubyists. Location is DC metro area. If you’re interested in a challenging position where

Re: [Rails] Re: Keep collection_select as selected after "submit"

2010-10-05 Thread Colin Law
On 5 October 2010 14:06, PalaniKannan K wrote: > > > On 5 October 2010 11:14, PalaniKannan K wrote: >> >> Dear All, >> >> Anybody knows to keep the selected option as alive even after "submit" in >> collection_select. > > Hi, > > I found the method. If I use like this I can keep as live. > > <%=

[Rails] Re: Keep collection_select as selected after "submit"

2010-10-05 Thread PalaniKannan K
On 5 October 2010 11:14, PalaniKannan K wrote: > Dear All, > > Anybody knows to keep the selected option as alive even after "submit" in > collection_select. > Hi, I found the method. If I use like this I can keep as live. <%= collection_select(@table, "gm", @pop, "col1", "col1", :prompt => tr

[Rails] Help with a find

2010-10-05 Thread Pito Salas
I have a simple one to many relation: class Precinct has_many :districts ... end I would like to find all Precincts that have no districts in a finder. Is that possible? I also am using the searchlogic gem (very nice) but even with that I could not concoct a one liner to do what I want. Any i

[Rails] Re: field_with_errors.

2010-10-05 Thread pepe
> > and if I don't want those divs? > > For my education, why would you object to them being there? Something that has bothered me from time to time is that when there are errors the tag takes the whole line and makes the field to end up in the next line, instead of appearing next to its labe

[Rails] Re: how to connect to microsoft sql server 6.5

2010-10-05 Thread pepe
I only know about SQLServer 2005 and 2008, not 6.5. Anyway, here is a list of things I had to do to get a project working with 2005 using Ruby 1.8.6, Rails 2.3.5 and Mongrel as the web server. You might need to skip/change some of the steps. I hope it helps: 1. Install Ruby (1.8.6): http://ww

[Rails] Re: Como utilizar Internacionalização no R ails - criar aplicações em português

2010-10-05 Thread wilson
Inside the folder "locale" I save the file pt-BR.yml. So, I've configured the application.rb file with "config.i18n.default_locale = :pt-BR" . When I've tried to start the server: rails server, I got this message: /application.rb:32: uninitialized constant DicEtim::Application::BR (NameError), etc.

[Rails] Re: Same file in different apps

2010-10-05 Thread Marnen Laibow-Koser
Hemant Bhargava wrote: > If i'll write an class/module and then share that class/module using > require/whatever.. Will that work? > > > Frederick Cheung wrote: > >> Your own plugin - you write one containing the code you want to share. >> >> Fred Fred's suggestion is the correct way. Just w

[Rails] Ajax request not coming

2010-10-05 Thread Hemant Bhargava
Hello guys, I am sending an ajax request in javascript with some parameters. Ajax request is javascript is written as:- new Ajax.Request( '/controllername/actionname?employee_id=' + employee_id + '&employee_name=' + emp_name + some_more_parameters, { asynchronous:true, evalScripts:true, onF

[Rails] Vacancy Ruby on Rails Developer (Ukraine, Kyiv)

2010-10-05 Thread Lilit Mao
We are looking for a Ruby on Rails developer to join our team. Requirements to candidates: - Strong technical and web development background - Strong RoR skills, experience in Ruby on Rails (not required if candidate is already familiar with other ruby/python frameworks such as Django or Merb) -

[Rails] something is removing my whitespace

2010-10-05 Thread bingo bob
Sorry for lack of a code example but I think in this case I cna just explain the issue and a lightbulb might go off with someone as to what is happening. I needed to allow my users to construct a nicely formatted piece of text that I'd render as HTML without having them to learn HTML. Didn't need

[Rails] 10 Points How Cells Improves your Rails Architecture

2010-10-05 Thread Nick Sutterer
What steps does it take to improve your architecture with Cells? This article [1] discusses the best practices from keeping views dumb, via slim controllers, how to avoid messy helpers, through to hiding your caching strategy and component-oriented teams. [1] http://nicksda.apotomo.de/2010/10/10

[Rails] Re: Same file in different apps

2010-10-05 Thread Hemant Bhargava
If i'll write an class/module and then share that class/module using require/whatever.. Will that work? Frederick Cheung wrote: > Your own plugin - you write one containing the code you want to share. > > Fred -- Posted via http://www.ruby-forum.com/. -- You received this message because y

[Rails] Keep collection_select as selected after "submit"

2010-10-05 Thread PalaniKannan K
Dear All, Anybody knows to keep the selected option as alive even after "submit" in collection_select. -- With Regards Palani Kannan. K -- 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.

[Rails] Re: img_submit_tag

2010-10-05 Thread Priyanka Pathak
Hi, Take normal form and define your controller & action there as url. Instade of normal submit_tag use image_submit_tag. eg. <% form_for :url => {:action => 'add_to_cart', :id => x} do |f| %> <%= image_submit_tag("agree.png") %> <% end %> -- Posted via http://www.ruby-forum.com/. -- You

Re: [Rails] field_with_errors.

2010-10-05 Thread Colin Law
On 5 October 2010 08:07, Mauro wrote: > On 5 October 2010 04:05, Butu wrote: >> Hello Mauro, >> >> tag is created in ActionView::Base >> class only in case of any errors. >> >> From Rails code base:- >> >>    # Specify the proc used to decorate input tags that refer to >> attributes with errors.

Re: [Rails] field_with_errors.

2010-10-05 Thread Mauro
On 5 October 2010 04:05, Butu wrote: > Hello Mauro, > > tag is created in ActionView::Base > class only in case of any errors. > > From Rails code base:- > >    # Specify the proc used to decorate input tags that refer to > attributes with errors. >    cattr_accessor :field_error_proc >    @@fiel