[Rails] Rails 3 data-method vs _method

2010-06-24 Thread mrbana...@googlemail.com
Hi, I would like to know if and how new data-method attribute should work together with _method url parameter Please take a look at the following example: Delete A link to trigger action logic_delete and we should use REST delete method type. In Rails 3 with new UJS this will not work if javascr

[Rails] migrate problem

2010-06-24 Thread pravin mishra
I have problem in "rake db:migrate" I have created database name "pravin" & rails apllication "ankit" (C:\InstantRails-2.0-win_2\rails_apps\rails ankit).After configre .YML file and moving (C:\InstantRails-2.0-win_2\rails_apps\cd ankit) I am running C:\InstantRails-2.0-win_2\rails_apps\ankit\rake

[Rails] extracting a portion of a model to a separate file

2010-06-24 Thread frankjmat...@gmail.com
G'day, I have a project that relies heavily on pluginaweeks "state_machine" gem. While I would have liked to post this to a state_machine forum, 1. I couldn't find one and 2. this is probably a generic ruby concept that I just can't piece together on my own - so asking here may be *more* appropria

[Rails] Re: Error installing gems for Rails 3.0.0.beta4 on MacOSx

2010-06-24 Thread frankjmat...@gmail.com
Also I should have noted, after you get rails installed and run rails new MyNewAppName you should cd to that directory and run bundle install that will install all of your gem dependencies from your Gemfile and you shouldn't get that sqlite3-ruby error anymore. On Jun 25, 1:00 am, "frankjmat...@gm

[Rails] Re: Error installing gems for Rails 3.0.0.beta4 on MacOSx

2010-06-24 Thread frankjmat...@gmail.com
Hey Andre, I would recommend a few things that could make your life easier. Use RVM. It allows you to easily install a local user copy of ruby without mucking about with your system. Follow the instructions at http://rvm.beginrescueend.com/rvm/install/ and remember - you don't have to be root. In

Re: [Rails] Rails models + database updates from outside rails

2010-06-24 Thread Radhesh Kamath
On Thu, Jun 24, 2010 at 4:07 PM, Hassan Schroeder wrote: > On Thu, Jun 24, 2010 at 2:00 PM, Radhesh Kamath wrote: > >> I am newbie to RoR, and I was looking for a way to do the following: > >> 3. Keep the models up to date with data from another source on the >> system (in addition to updates to

Re: [Rails] My First Ruby App

2010-06-24 Thread kannav rajeev
hey radha please explain what you need actually if you trying to making a rough apps write down the table field here migrattion tell to create or update ot delete table in to db from the rails app. if you make a table in db without a migration how would you connect it from rails app . any further h

[Rails] My First Ruby App

2010-06-24 Thread Free Bies
Hi All, Here is my roadmap for my first app in ruby: 1) installed vbox and have ubuntu 10.04 lucid as guest os 2) using apache, passenger , mysql and ruby on rails. Installed all of them separately. so this is the stack i'm using. i'm originally well versed in oracle /ms sql db design and pgm. so

[Rails] Error installing gems for Rails 3.0.0.beta4 on MacOSx

2010-06-24 Thread Andre joseph Cubeta
I tried to install Rails 3 Beta in my snow.leopard machine using the command below: (w/ sudo if it requires) gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n unfortunately after 12 gems installed i got an error regarding builder-2.1.2

[Rails] rails3 finders, rails3 gure's and MVC police

2010-06-24 Thread AppleII717
I've been experimenting with rails since before 1.0. I actually deployed an application with 2.0.x something. It is my test application that has been written in Excel, Applescript, PHP, Active4D and Rails. It is just a little local golf group scoring application - AKA sort of a handicap system. W

Re: [Rails] Re: Re: Re: VirtualRails : The FREE Ruby on Rails virtual development platform

2010-06-24 Thread Dieter Lunn
It works now. Thanks. Dieter Lunn http://www.coder2000.ca On Thu, Jun 24, 2010 at 8:28 PM, Jerome Fillioux wrote: > Dieter Lunn wrote: >> I am getting possibly the same keyboard error as Ali. When I press / I >> get ! and q and a are swapped. Most of the keys are correct though. I >> am using

[Rails] Re: Re: Re: VirtualRails : The FREE Ruby on Rails virtual development platform

2010-06-24 Thread Jerome Fillioux
Dieter Lunn wrote: > I am getting possibly the same keyboard error as Ali. When I press / I > get ! and q and a are swapped. Most of the keys are correct though. I > am using a standard US layout keyboard on a windows 7 host. Is there a > mailing list or forum for VirtualRails so we don't pollute t

Re: [Rails] Re: Re: VirtualRails : The FREE Ruby on Rails virtual development platform

2010-06-24 Thread Dieter Lunn
I am getting possibly the same keyboard error as Ali. When I press / I get ! and q and a are swapped. Most of the keys are correct though. I am using a standard US layout keyboard on a windows 7 host. Is there a mailing list or forum for VirtualRails so we don't pollute the rails list with support

[Rails] Re: weird ArgumentError in non-ActiveRecord models

2010-06-24 Thread candor
I got a very ugly workaround to work - I created a fresh project from scratch (no git, no delayed job, no devise, nothing:-)) and added the files in. Then I merged the non-active record models into one (non AR) model. So, all calls are within the same class, and this works. The interesting thing i

[Rails] Re: DRY a named scope

2010-06-24 Thread Me
Thanks. Trying to keep the controller simple: Takes a value or not. One thing I could do was put he include inside the method call but where does the param go? Node.has_valid_sysoid(..) The scope is working, just trying cut out the duplication. On Jun 24, 5:57 pm, Philip Hallstrom wrote: > On

Re: [Rails] Rails models + database updates from outside rails

2010-06-24 Thread Hassan Schroeder
On Thu, Jun 24, 2010 at 2:00 PM, Radhesh Kamath wrote: > I am newbie to RoR, and I was looking for a way to do the following: > 3. Keep the models up to date with data from another source on the > system (in addition to updates to the models via rails controllers). > > Now, RoR is great for 1 an

Re: [Rails] DRY a named scope

2010-06-24 Thread Philip Hallstrom
On Jun 24, 2010, at 3:34 PM, Me wrote: > Is there a way to DRY this up a bit? > > named_scope :has_valid_sysoid, lambda{|sysoid| >(sysoid.nil?) ? {:conditions => ["nodesysoid IS NOT NULL AND > nodelabel LIKE '%-to-%'"], :include => [:ipinterface, :alarm]} : > {:conditions => ["nodesysoid IS

[Rails] Re: Re: VirtualRails : The FREE Ruby on Rails virtual development platform

2010-06-24 Thread Jerome Fillioux
Bryan Jarvis wrote: > I downloaded this, but it looks like it > doesn't support vmware workstation. > Is there, by chance, a version that does? > Thanks! > Bryan Hi Bryan, i'm affraid we don't plan offering virtualrails on vmware at this time. why don't you give a try to virtualbox, it is free,

[Rails] Re: VirtualRails : The FREE Ruby on Rails virtual development platform

2010-06-24 Thread Jerome Fillioux
Ali Imran wrote: > Yes i download this ,, installation works fine ,, but keyboard was not > working well ... I press something and get something else > > is there any solution for this... Hi again Ali, thanks for your help ! if your keyboard layout is correctly configured in virtualrails, this i

[Rails] DRY a named scope

2010-06-24 Thread Me
Is there a way to DRY this up a bit? named_scope :has_valid_sysoid, lambda{|sysoid| (sysoid.nil?) ? {:conditions => ["nodesysoid IS NOT NULL AND nodelabel LIKE '%-to-%'"], :include => [:ipinterface, :alarm]} : {:conditions => ["nodesysoid IS NOT NULL AND nodelabel LIKE '%-to-%' AND nodesysoid

[Rails] Re: scaffold not generating _form.rhtlml.erb fiel in app/view

2010-06-24 Thread Me
You need a model name then the attributes for the model. ruby script/generate scaffold modelname name:string, etc On Jun 24, 1:44 pm, pravin mishra wrote: > i have installed > ruby 1.8.6 window version, > rails 2.0.2 > > everything runs fine except SCAFFOLD > when i run > ruby script/genera

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-06-24 Thread Jerome Fillioux
Ali Imran wrote: > No i did not face this problem with Ubuntu, That is running normaly on > my all machines, i.e desktops and laptops.. Under virtualbox I mean -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-06-24 Thread Ali Imran
No i did not face this problem with Ubuntu, That is running normaly on my all machines, i.e desktops and laptops.. On Jun 24, 4:05 pm, Jerome Fillioux wrote: > Ali Imran wrote: > > Buddy, you did the great job, > > > Yes I tried all possible key board support in Ubuntu. It did not work, > > I al

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-06-24 Thread Jerome Fillioux
Ali Imran wrote: > Buddy, you did the great job, > > Yes I tried all possible key board support in Ubuntu. It did not work, > I also did not try 1.1. > > I will download it and try it on my machines will let you know about > my that experience too. > > Thanks, hum, there is no reason that the 1

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-06-24 Thread Ali Imran
There is only one version to download. On Jun 24, 3:58 pm, Ali Imran wrote: > Buddy, you did the great job, > > Yes I tried all possible key board support in Ubuntu. It did not work, > I also did not try 1.1. > > I will download it and try it on my machines will let you know about > my that exp

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-06-24 Thread Ali Imran
Buddy, you did the great job, Yes I tried all possible key board support in Ubuntu. It did not work, I also did not try 1.1. I will download it and try it on my machines will let you know about my that experience too. Thanks, On Jun 24, 3:55 pm, Jerome Fillioux wrote: > Ali Imran wrote: > >

[Rails] Re: Newbie on rails, need some help :D

2010-06-24 Thread Newbie Onrails
Bohdan Pohoriletz wrote: > Try > <%= f.select(:part1, {List::NAME, List::TYPE}) > > > <%= collection_select(:post, :user_id, User.all, :id, :name) %> > Thanks, neither of these exactly worked the way I wanted them, but it did help me with googling what I was looking for. For the first one,

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-06-24 Thread Jerome Fillioux
Ali Imran wrote: > Thanks for the reply: > > I install it on my laptop, and key board is not supporting ... Its HP > machine.. > > Thanks You're welcome did you tried the last 1.1 version ? It comes with a better US keyboard layout support. On the other side, like on any Ubuntu system, you can

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-06-24 Thread Ali Imran
Thanks for the reply: I install it on my laptop, and key board is not supporting ... Its HP machine.. Thanks On Jun 24, 3:34 pm, Jerome Fillioux wrote: > Ali Imran wrote: > > I installed It , Can you please help me how to setup the Ruby on rails > > over this virtual machine.? > > > Thanks..

[Rails] Re: Re: Re: Re: How to generate an application/excel type download?

2010-06-24 Thread Fritz Trapper
Ar Chron wrote: > Similar to what Peter is pointing out, I use a similar construct to > generate and send a pdf to the user off a link on the 'show' form... > > def pdf > if @project = Project.find(params[:id]) > filename = > @project.name+"-"+Time.now.strftime("%Y-%m-%d-%H%M")+".pdf" >

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-06-24 Thread Jerome Fillioux
Ali Imran wrote: > I installed It , Can you please help me how to setup the Ruby on rails > over this virtual machine.? > > Thanks.. Hi, I'm the Project Manager of VirtualRails :) you don't have to setup Ruby on Rails on VirtualRails, It's already done. In fact, the VirtualRails virtual machin

[Rails] Re: VirtualRails : The FREE Ruby on Rails virtual development platform

2010-06-24 Thread Ali Imran
Yes i download this ,, installation works fine ,, but keyboard was not working well ... I press something and get something else is there any solution for this... On Jun 24, 5:13 am, Lecky wrote: > Nice, support + 1~ > > On Jun 24, 7:27 am, Jerome Fillioux wrote: > > > the new virtualrail

[Rails] Development: How to setup Virtual Machine for Rails

2010-06-24 Thread Ali Imran
I am working on windows xp I install Virtual machine How... http://www.pendrivelinux.com/running-linux-from-within-windows-virtua... ISO...(i install Ubuntu) http://www.linuxlookup.com/linux_iso Virtualbox... http://www.virtualbox.org/wiki/Downloads Than I install ruby, gem, rails - $ rub

Re: [Rails] Error: Trying to install passenger-install-apache2-module

2010-06-24 Thread Juan Pablo Genovese
Ali, in order for us to help, you should provide us as much information as you can about the issues you're having. In this case: * Which OS are you using? * Which Rails version? * Which Ruby version? * Are you trying to install a development, testing or production environment? * Describe the proce

[Rails] How can I set the default time_zone to the local time zone

2010-06-24 Thread Rakesh Arora
Here is the entry in the environment.config to set the time_zone: # config/environment.rb config.time_zone = ‘UTC’ Instead of setting this to a particular time zone, is it possible to set this to the local time zone? Thanks, -Rakesh -- Posted via http://www.ruby-forum.com/. -- You received th

Re: [Rails] Re: VirtualRails : The FREE Ruby on Rails virtual development platform

2010-06-24 Thread Bryan Jarvis
I downloaded this, but it looks like it doesn't support vmware workstation. Is there, by chance, a version that does? Thanks! Bryan On 2010-06-23 16:27, Jerome Fillioux wrote: the new virtualrails 1.1 now includes git, mongodb, capistrano, ack, vim, and an improved US keyboard support :)

[Rails] scaffold not generating _form.rhtlml.erb fiel in app/view

2010-06-24 Thread pravin mishra
i have installed ruby 1.8.6 window version, rails 2.0.2 everything runs fine except SCAFFOLD when i run ruby script/generate scaffold modelname controllername actions e,g. C:depot>ruby script/generate scaffold Album albums it gives following error "WRONG NUMBER OF ARGUMENTS (1 FOR 2)"

Re: [Rails] Re: Re: Re: Re: How to generate an application/excel type download?

2010-06-24 Thread pravin mishra
i have installed ruby 1.8.6 window version, rails 2.0.2 everything runs fine except SCAFFOLD when i run ruby script/generate scaffold modelname controllername actions e,g. C:depot>ruby script/generate scaffold Album albums it gives following error "WRONG NUMBER OF ARGUMENTS (1 FOR 2)"

[Rails] scaffold not generating _form.rhtlml.erb fiel in app/view

2010-06-24 Thread pravin mishra
I'm learning about Ruby on Rails. Please help me. Althougth I do step-by-step with books(config data, generate model, add data field in db/migrate/file.rb) but i can't generate with scaffold or error. When run command: ruby script\generate scaffold Employee And check: http://127.0.0.1:3000/employe

[Rails] Rails models + database updates from outside rails

2010-06-24 Thread Radhesh Kamath
Hi Folks, I am newbie to RoR, and I was looking for a way to do the following: 1. Run a service that provides a RESTful API. 2. Use the rails ORM (it is really convenient) 3. Keep the models up to date with data from another source on the system (in addition to updates to the models via rails con

[Rails] Re: Error: Trying to install passenger-install-apache2-module

2010-06-24 Thread Ali Imran
I am working on windows xp I install Virtual machine How... http://www.pendrivelinux.com/running-linux-from-within-windows-virtually/ ISO...(i install Ubuntu) http://www.linuxlookup.com/linux_iso Virtualbox... http://www.virtualbox.org/wiki/Downloads Than I install ruby, gem, rails - $ ru

[Rails] Re: Error: Trying to install passenger-install-apache2-module

2010-06-24 Thread Ali Imran
problem solved: http://www.postal-code.com/binarycode/2008/05/21/installing-passenger-mod_rails-command-not-found/ On Jun 24, 2:23 pm, Ali Imran wrote: > i am trying to install > > passenger-install-apache2-module > > but it is giving me the error. > > E: could'nt find the package passenger-ins

[Rails] Error: Trying to install passenger-install-apache2-module

2010-06-24 Thread Ali Imran
i am trying to install passenger-install-apache2-module but it is giving me the error. E: could'nt find the package passenger-install-apache2-module Please help me over this. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to

[Rails] Re: weird ArgumentError in non-ActiveRecord models

2010-06-24 Thread candor
I have tried several things in the last few hours - including branching, ripping out all the files, and adding the code back one bit at a time. I am really out of choices now - one interesting thing - this error seems to occur only on the rails app codepath. When I call the same function from a uni

[Rails] Q: Rails 3 Multiselect input param

2010-06-24 Thread Tim Washington
In Rails 3, I have a multi-select form control (fig. 1). When I select more than 1 value, Firefox sends both values (fig. 2). But only the last value gets sent as a input value to my controller (fig. 3). How do I get all those values passed on to my controller?

[Rails] Re: Re: Re: Re: How to generate an application/excel type download?

2010-06-24 Thread Ar Chron
Similar to what Peter is pointing out, I use a similar construct to generate and send a pdf to the user off a link on the 'show' form... def pdf if @project = Project.find(params[:id]) filename = @project.name+"-"+Time.now.strftime("%Y-%m-%d-%H%M")+".pdf" filename = filename.gsub(" ","

[Rails] Nested Model Forms

2010-06-24 Thread Ants Pants
I'm trying to get a multi level nested form model working but have hit a problem. In one of my models, I have a habtm association and it's throwing an error on a nested form and these are check boxes with a method of 'time_unit_ids[]'. The nested forms work without the habtm (time_unit_ids[]) so

[Rails] Re: Parent model running validations on all existing children

2010-06-24 Thread Ruben Ascencio
I was expecting Rails to only validate the phrase that is being updated, here you can see it's validating all of the existing phrases: $ script/console Loading development environment (Rails 2.3.5) >> lang = Language.first => # >> lang.phrases => [#, #, #] >> lang.phrases_attributes = [{:id => "

[Rails] Re: link_to underlying urls/paths are showing in the actual view

2010-06-24 Thread Matt Royer
> I'm getting the same thing. I'm on Rails 3.0.0.beta4. > > Have you found a solution to this? One more thing. I only get this when I use Firefox (I haven't tried Opera or Chrome though). In Interet Explorer, this works how it should with only showing the names and not the the paths in parenthe

Re: [Rails] Re: show crypted password??

2010-06-24 Thread Fernando Brito
http://www.google.com/search?q=authlogic+forgot+password Be careful. Some examples may be quite old, but it will give you the big picture of how to implement this. This one is quite interesting (and seems to be up to date): http://github.co

Re: [Rails] Re: show crypted password??

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 18:28, David Zhu wrote: Right, is it difficult to write out that "secret token"? hmm I'm having trouble picturing how the code should look like ... and http://github.com/rejeep/authlogic-password-reset-tutorial -- You received this message because you are subscribed to the

Re: [Rails] Re: show crypted password??

2010-06-24 Thread Aaron Turner
On Thu, Jun 24, 2010 at 9:28 AM, David Zhu wrote: > >> > In authlogic, I set the password field to "crypted password" >> >> > Is there a way to display a password, even if its "crypted"? What if >> > the user forgets the password and needs to recover it? How can I >> > recover a crypted password?

Re: [Rails] Re: show crypted password??

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 18:28, David Zhu wrote: In authlogic, I set the password field to "crypted password" Is there a way to display a password, even if its "crypted"? What if the user forgets the password and needs to recover it? How can I recover a crypted password? You don't "recover" it.

Re: [Rails] Re: Controller and Scaffold Controller generator - plural vs. singular

2010-06-24 Thread Fernando Brito
Ah, thank you for your answer! :D I was not sure about Ruby on Rails convention of naming controllers in plural. :) -- Fernando Brito -- 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: show crypted password??

2010-06-24 Thread David Zhu
> > In authlogic, I set the password field to "crypted password" > > > Is there a way to display a password, even if its "crypted"? What if > > the user forgets the password and needs to recover it? How can I > > recover a crypted password? > > You don't "recover" it.  You reset it.  User types in

Re: [Rails] show crypted password??

2010-06-24 Thread Aaron Turner
On Thu, Jun 24, 2010 at 9:17 AM, David Zhu wrote: > In authlogic, I set the password field to "crypted password" > > Is there a way to display a password, even if its "crypted"? What if > the user forgets the password and needs to recover it? How can I > recover a crypted password? You don't "rec

Re: [Rails] Re: Re: Re: How to generate an application/excel type download?

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 17:19, Fritz Trapper wrote: It's really a member function of class data < ActiveRecord::Base def to_excel_2003 debugger end end and gets called from format.xls { render :xls => @data.to_excel_2003 } My problem now is to find a trick to redirect back to show after down

[Rails] show crypted password??

2010-06-24 Thread David Zhu
In authlogic, I set the password field to "crypted password" Is there a way to display a password, even if its "crypted"? What if the user forgets the password and needs to recover it? How can I recover a crypted password? Thanks -- You received this message because you are subscribed to the Go

[Rails] Rails 3 and respond_to_parents

2010-06-24 Thread Sharkie Landshark
I am getting NameError (undefined local variable or method `erase_redirect_results' for #): It seems that erase_redirect_results have been moved or no longer exists in Rails 3.0 What should I do? Is there a way to get respond_to_parents to work with Rails 3.0? Or is there an alternative method

[Rails] Re: link_to underlying urls/paths are showing in the actual view

2010-06-24 Thread Matt Royer
Adler Santos wrote: > for example I have the following simple code in my views: > > <%= link_to "Here", :controller => 'home', :action => 'inside_here' %> > > I get the "actual" view in the page looking like this: > > Here (/home/inside_here) > > where the underlying url is showing right beside

[Rails] Parent model running validations on all existing children

2010-06-24 Thread Ruben Ascencio
In my application, a Language has many Phrases. Here is my code: #language model has_many :phrases accepts_nested_attributes_for :phrases #phrase model validates_presence_of :value belongs_to :language #languages controller def edit @language = Language.find(params[:id]) # Let's say w

[Rails] Re: Re: Re: How to generate an application/excel type download?

2010-06-24 Thread Fritz Trapper
Peter De Berdt wrote: > On 24 Jun 2010, at 16:10, Fritz Trapper wrote: > >> format.html >> format.xml { render :xml => @people.to_xml } >>end >> end >> >> For me, to_xml looks like method of the class of @people. Right? > > Well, it's actually a method from Enumerable or Array whic

Re: [Rails] Re: Installation: How to install phpMyAdmin on Ubuntu

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 16:56, Ali Imran wrote: Thanks for the reply. Do you have any link to learn more about this. On Jun 24, 8:51 am, Hassan Schroeder wrote: On Thu, Jun 24, 2010 at 7:42 AM, Ali Imran wrote: I am working on a virtual machine with Ubuntu. Please if someone know how to in

[Rails] Re: Installation: How to install phpMyAdmin on Ubuntu

2010-06-24 Thread Ali Imran
Thanks for the reply. Do you have any link to learn more about this. On Jun 24, 8:51 am, Hassan Schroeder wrote: > On Thu, Jun 24, 2010 at 7:42 AM, Ali Imran wrote: > > I am working on a virtual machine with Ubuntu. Please if someone know > > how to install it over here > > "phpMyAdmin"? Blech

Re: [Rails] Re: use third party library

2010-06-24 Thread Leonardo Mateo
On Thu, Jun 24, 2010 at 11:28 AM, Mlle wrote: > script/plugin install http://github.com/creaven/miftree.git > > > I did that but what else do I need to do to use the library? If they are JavaScript files, you have to include them somewhere in your HTML. The most common way is to use the javascript

Re: [Rails] Installation: How to install phpMyAdmin on Ubuntu

2010-06-24 Thread Hassan Schroeder
On Thu, Jun 24, 2010 at 7:42 AM, Ali Imran wrote: > I am working on a virtual machine with Ubuntu. Please if someone know > how to install it over here "phpMyAdmin"? Blech. Why waste your time fooling with that? Learn to use the MySQL command line client -- you'll be *way* better off in the long

Re: [Rails] Re: PHP to RoR: What is equal of insert in RoR

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 16:39, Ali Imran wrote: Thanks buddy, This is great help for just starter. I spend a lot of time on just to understand this MVC. You are right this is a big difference between PHP and ROR. Depends on whether you have used a FRAMEWORK in PHP before. PHP frameworks such as

[Rails] Installation: How to install phpMyAdmin on Ubuntu

2010-06-24 Thread Ali Imran
I am working on a virtual machine with Ubuntu. Please if someone know how to install it over here -- 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

[Rails] Re: PHP to RoR: What is equal of insert in RoR

2010-06-24 Thread Ali Imran
Thanks buddy, This is great help for just starter. I spend a lot of time on just to understand this MVC. You are right this is a big difference between PHP and ROR. On Jun 24, 8:01 am, Robert Walker wrote: > Ali Imran wrote: > > <% > > > @obj= params[:category] > > > @cat...@obj["catid"] > > >

Re: [Rails] Re: Re: How to generate an application/excel type download?

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 16:10, Fritz Trapper wrote: Peter De Berdt wrote: This is just as wrong, you just need to serve up data using what's available in Rails. Anyway, send_data is the thing you want. There is an example in responde_to: def index @people = Person.find(:all) respond_to

[Rails] Re: use third party library

2010-06-24 Thread Mlle
script/plugin install http://github.com/creaven/miftree.git I did that but what else do I need to do to use the library? On Jun 24, 3:39 pm, Mlle wrote: > What steps to I have to take to use something like Mif in my > app?http://mifjs.net > > Where do I have to put the source files? -- You r

[Rails] Re: Controller and Scaffold Controller generator - plural vs. singular

2010-06-24 Thread Robert Walker
Fernando Brito wrote: > Why does: > > *$ rails g controller project* > Generates *app/controllers/project_controller.rb* > > and > > *$ rails g scaffold_controller project* > Generates *app/controllers/projects_controller.rb* and > *app/views/projects/* This is by design. Consider: $ rails g

[Rails] Re: Redirecting old URLs to new permalinked URLs

2010-06-24 Thread Joe
More problems.. Firstly I don't have an application.rb file to add this into. Secondly, where does my example use a regular expression? and how can I do something similar with my RoR application? On 24 June, 11:55, Lecky wrote: > Hi Joe, > > Firstly, this code goes in config/application.rb.

[Rails] Re: Re: How to generate an application/excel type download?

2010-06-24 Thread Fritz Trapper
Peter De Berdt wrote: > This is just as wrong, you just need to serve up data using what's > available in Rails. Anyway, send_data is the thing you want. There is an example in responde_to: def index @people = Person.find(:all) respond_to do |format| format.html format.xml

[Rails] Re: PHP to RoR: What is equal of insert in RoR

2010-06-24 Thread Robert Walker
Ali Imran wrote: > <% > > @obj= params[:category] > > @cat...@obj["catid"] > > @newrec= Category.new(:catid=>@catid) > @newrec.save > > %> As far a I see it there are two primary patterns that you may not be accustomed to coming from the PHP world. Plus one principal you may be struggling ag

[Rails] use third party library

2010-06-24 Thread Mlle
What steps to I have to take to use something like Mif in my app? http://mifjs.net Where do I have to put the source files? -- 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...@googlegroup

Re: [Rails] User Management in Ruby on rails

2010-06-24 Thread Michael Pavling
On 24 June 2010 11:30, musammil wrote: >  Login Managements There's lots of plugins/gems that handle what you're asking about. Personally, I'd recommend "Clearance" for user authorisation management. http://ruby-toolbox.com/categories/rails_authentication.html >  User permission ( certain user c

Re: [Rails] Re: How to generate an application/excel type download?

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 15:19, Fritz Trapper wrote: OK, that's nonsense. should be: format.xls { render :xls => @data.to_excel_2003 } This is just as wrong, you just need to serve up data using what's available in Rails. Anyway, send_data is the thing you want. Best regards Peter De B

Re: [Rails] Re: How to generate an application/excel type download?

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 15:12, Fritz Trapper wrote: Thanks for your quick reply. For a quick test, I entered http://localhost:3000/data/5.xls into the browser. The response is: "Template is missing" The code fragment in show is: respond_to do |format| format.html # show.html.erb for

[Rails] Re: How to generate an application/excel type download?

2010-06-24 Thread Fritz Trapper
Fritz Trapper wrote: > The code fragment in show is: > > respond_to do |format| > format.html # show.html.erb > format.xls { render :to_excel_2003 => @data } > end OK, that's nonsense. should be: > format.xls { render :xls => @data.to_excel_2003 } -- Posted via http:

Re: [Rails] calculate the number of months difference between two dates

2010-06-24 Thread Michael Pavling
On 24 June 2010 13:29, Tom Mac wrote: >     Now how to get month difference as 3  (date1 - date2) Googling for "ruby months between two dates" gleans this as the first result: http://www.francisfish.com/getting_the_number_of_months_between_two_dates_in_rubyrails.htm ...and loads of other likely

[Rails] Users form

2010-06-24 Thread Sergey_M
you can go to http://phpforms.net/tutorial/html-basics/php-forms.html, as I know they offer such services -- 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 unsubscri

[Rails] User Management in Ruby on rails

2010-06-24 Thread musammil
Hello Guys, I am a PHP developer. newbie to ROR. I want to learn Ruby on rails. and my client need a user management application with the following features Login Managements User permission ( certain user can add/update record , certain user can view the records , etc...) CRUD (employee manage

[Rails] Re: Failing Routes in deployment

2010-06-24 Thread johnb
turns out to be nothing to do with Herokupointing the finger too early :) Seems to be a problem with Rails 3 Namescope routes (/admin) and the right_aws gem declared in both a production and staging environment in the Gemfile. John. On Jun 24, 11:51 am, johnb wrote: > It seems to be depend

[Rails] Re: How to generate an application/excel type download?

2010-06-24 Thread Fritz Trapper
Thanks for your quick reply. For a quick test, I entered http://localhost:3000/data/5.xls into the browser. The response is: "Template is missing" The code fragment in show is: respond_to do |format| format.html # show.html.erb format.xls { render :to_excel_2003 => @data }

Re: [Rails] How to generate an application/excel type download?

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 13:57, Fritz Trapper wrote: For my data aquisition application, I want to implement a download function, that generates a file in excel 2003 (xml) - Format. Is it possible to add a new format the show function to produce such a file and send it to the client? Add the follo

[Rails] calculate the number of months difference between two dates

2010-06-24 Thread Tom Mac
Please share if there any such easy methods in rails. I have dates like date1 = Date.today date2 = Date.today - 3.months (Example can be anything) Now how to get month difference as 3 (date1 - date2) Thanks for any help Tom -- Posted via http://www.ruby-forum.com/. -- You receive

[Rails] Re: Why wouldn't the server run?

2010-06-24 Thread Abder-rahman Ali
Rui Carvalho wrote: > it would appear that the probem is in your routes file! > can you show us, your routes file? Thanks Rui. You are absolutely right. In my routes.rb files, I had a strange symbol (NOT rails symbols, I mean like a shape) before "map" in map.connect which was as "§map". I rem

[Rails] How to generate an application/excel type download?

2010-06-24 Thread Fritz Trapper
For my data aquisition application, I want to implement a download function, that generates a file in excel 2003 (xml) - Format. Is it possible to add a new format the show function to produce such a file and send it to the client? -- Posted via http://www.ruby-forum.com/. -- You received this

Re: [Rails] Why wouldn't the server run?

2010-06-24 Thread Rui Carvalho
it would appear that the probem is in your routes file! can you show us, your routes file? On Thu, Jun 24, 2010 at 12:48 PM, Abder-rahman Ali wrote: > I'm trying to run the server locally using the following command: > > $ ruby script/serve > > And, this is the trace of what I get: http://pastie.

[Rails] Why wouldn't the server run?

2010-06-24 Thread Abder-rahman Ali
I'm trying to run the server locally using the following command: $ ruby script/serve And, this is the trace of what I get: http://pastie.org/1017034 Where is the problem here? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Go

[Rails] Re: VirtualRails : The FREE Ruby on Rails virtual development platform

2010-06-24 Thread Lecky
Nice, support + 1~ On Jun 24, 7:27 am, Jerome Fillioux wrote: > the new virtualrails 1.1 now includes git, mongodb, capistrano, ack, > vim, and an improved US keyboard support :) > > check it athttp://www.virtualrails.org > -- > Posted viahttp://www.ruby-forum.com/. -- You received this mes

[Rails] Re: Redirecting old URLs to new permalinked URLs

2010-06-24 Thread Lecky
Hi Joe, Firstly, this code goes in config/application.rb. Secondly, you can write regular expression like the example did to redirect your URLs. Cheers, Lecky On Jun 24, 2:51 am, Joe wrote: > I see code like this used in examples: > > config.gem 'rack-rewrite', '~> 1.0.0' >   require 'rack/rewr

[Rails] Re: Failing Routes in deployment

2010-06-24 Thread johnb
It seems to be dependent on the environment the application is running in, development seems to work, I'm seeing a routing failure locally in production mode the same as Neil details above and also a 'staging' environment that I'm also running on Heroku On Jun 23, 6:14 pm, johnb wrote: > I have e

[Rails] Re: Silly little link_to question

2010-06-24 Thread richardsugg
Gotcha! Thanks for your assistance! On Jun 23, 4:43 am, Rui Carvalho wrote: > sure, > > if you wanted to name it ":company_id=>@company.id" > then in the routes file you would have to do > >  map.connect ':controller/:action/:company_id' > > or else it will interpet as one cgi query parameter >

Re: [Rails] Handle multiple requests at one time

2010-06-24 Thread Peter De Berdt
On 24 Jun 2010, at 12:05, William D. wrote: I have the following problem: My application contains a mechanism to administrate some external services via a SOAP-API. If a user submit a SOAP-Request, he is waiting for the SOAP-Response (it's necessary to show him the response). While this time th

[Rails] Custom account subdomains with Rails 3

2010-06-24 Thread Piotr Sarnacki
Hi, I needed to handle custom account subdomains with Rails and I wrote a simple rack middleware for that http://github.com/drogus/rack-subdomain. It works by mapping any subdomain to given PATH. For example when user hits drogus.example.org/account and mapping is /users/:subdomain, it will map th

[Rails] named scope and has_many

2010-06-24 Thread Tom Mac
Hi I have the models User and Payment. The relation between them user has_many payments payment belongs_to user payments table has a field paid_date. Now for finding out the last paid_date for a particular user I did like class payment < ActiveRecord::Base named_scope :last_payment_da

[Rails] Handle multiple requests at one time

2010-06-24 Thread William D.
Hi, I have the following problem: My application contains a mechanism to administrate some external services via a SOAP-API. If a user submit a SOAP-Request, he is waiting for the SOAP-Response (it's necessary to show him the response). While this time the Rails application is 'blocked' – another

[Rails] Re: Failing Routes in deployment

2010-06-24 Thread johnb
I have exactly the same problem, works locally (osx) but when deployed to Heroku I get a similar error has Neil has detailed above Rails 3 b4. John. On Jun 22, 10:09 am, Neil wrote: > Anyone?  From what I can see from the guides, what I am doing here is > correct (http://guides.rails.info/routi

  1   2   >