[Rails] how to show photo preview in rails

2012-05-29 Thread honey ruby
hi all i'm trying to know how to show a photo preview before uploading a pic in rails can any one help me out . Thanks in advance -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googl

[Rails] Re: Setting Up A Rails App With Passenger

2012-05-29 Thread concept47
You can also look into pow http://pow.cx/, so you don't have to worry about configuring your sites at all. Just install it, install the powder gem, go to your app folder and type 'powder link' and your site will be available at http://yourappname.dev pretty slick. On Monday, May 28, 2012 7:21:1

Re: [Rails] no record or else error:disk image is malformed

2012-05-29 Thread Colin Law
On 29 May 2012 21:16, Prajwal B. wrote: > i have database file name tel-directory.sqlite and its text file in db > folder so i went to config/database.yaml changed it to The config file is .yml not .yaml > db/tel-directory.sqlite in development then create a model > telephone_records skipping mi

[Rails] Problem generate migration

2012-05-29 Thread Felipe Pieretti Umpierre
Hello, I have Ruby installed in my Windows 7, but when I try to generate a new migration, this error appears: C:\rails\organily>rails g migration Task invoke active_record C:/Ruby193/lib/ruby/1.9.1/psych.rb:203:in `parse': (): mapping values a re not allowed in this context at line 8 colum

Re: [Rails] Can't get css to load in rails 3.2.3 development

2012-05-29 Thread Vell
On Tuesday, May 29, 2012 12:42:11 PM UTC-4, Vell wrote: > > > > On Saturday, May 26, 2012 5:33:00 PM UTC-4, Colin Law wrote: >> >> On 26 May 2012 22:18, Vell wrote: >> > >> > >> > On Saturday, May 26, 2012 4:45:13 PM UTC-4, Colin Law wrote: >> >> >> >> On 26 May 2012 21:39, Vell wrote: >>

[Rails] no record or else error:disk image is malformed

2012-05-29 Thread Prajwal B.
i have database file name tel-directory.sqlite and its text file in db folder so i went to config/database.yaml changed it to db/tel-directory.sqlite in development then create a model telephone_records skipping migration then i configured controller and its view but i get something no table found

Re: [Rails] Can't get css to load in rails 3.2.3 development

2012-05-29 Thread Vell
On Saturday, May 26, 2012 5:33:00 PM UTC-4, Colin Law wrote: > > On 26 May 2012 22:18, Vell wrote: > > > > > > On Saturday, May 26, 2012 4:45:13 PM UTC-4, Colin Law wrote: > >> > >> On 26 May 2012 21:39, Vell wrote: > >> > > >> > > >> > On Saturday, May 26, 2012 12:07:33 PM UTC-4, Colin

Re: [Rails] Can't get css to load in rails 3.2.3 development

2012-05-29 Thread Vell
On Saturday, May 26, 2012 5:24:26 PM UTC-4, Colin Law wrote: > > On 26 May 2012 22:19, Vell <> wrote: > > > > > > On Saturday, May 26, 2012 4:55:58 PM UTC-4, Colin Law wrote: > >> > >> Just to clarify, I meant pass your reply through a syntax validator :) > > > > > > Im sorry maybe I stil

Re: [Rails] rails block in js.erb ?

2012-05-29 Thread Jeffrey L. Taylor
Quoting Erwin : > I am trying to run a bloc in a js.erb script , but I don't get ir ... > debugger show that the test is true, so it should run .. > > <% if (params[:blog_page].to_i > 0) do %> > >alert("should redisplay the dashboard page"); >window.location.href = <%= backoffice_url %>;

[Rails] rails block in js.erb ?

2012-05-29 Thread Erwin
I am trying to run a bloc in a js.erb script , but I don't get ir ... debugger show that the test is true, so it should run .. <% if (params[:blog_page].to_i > 0) do %> alert("should redisplay the dashboard page"); window.location.href = <%= backoffice_url %>; location.reload(); $('#

[Rails] my first Cucumber test

2012-05-29 Thread moises zaragoza
i whant to test that i have a homepage and that it says Welcome on it. i am using Cucumber to make this happen File:features/public_pages.feature Feature: Public pages Scenario Outline: Visit public pages When I go to Then i should see "" Examples: List of pages and there titles

Re: [Rails] Re: Relationship issue with activerecord rails

2012-05-29 Thread Pringles Original
Thanks Jeremy, your code got me rolling. I will be doing more reading http://guides.rubyonrails.org/association_basics.html On Tue, May 29, 2012 at 9:00 AM, Jeremy Walker wrote: > > > On 29 May 2012 13:26, Steve Knit wrote: > >> Hello Jeremy, thanks for providing me your experience and quick >>

[Rails] Multiple applications with same model and db

2012-05-29 Thread Erdem Gezer
Hi, I'm developing an enterprise web applications with rails. I'm trying to figure out the best way of using the same models and database between 2-3 rails applications. My project consists of different applications such as user app, customer app and admin app. All of these 3 will use the same da

Re: [Rails] Re: Relationship issue with activerecord rails

2012-05-29 Thread Jeremy Walker
On 29 May 2012 13:26, Steve Knit wrote: > Hello Jeremy, thanks for providing me your experience and quick > response! > You're welcome! So you know, it's customary to post your responses in the relevant place of a thread, rather than top-posting. It makes the conversation easier to follow. > >

[Rails] Consuming .net web service using rails - actionwebservice

2012-05-29 Thread Sathiyaraj Gurusamy
Hi, Environment : Rails v-1.2.3, Ruby v-1.8.6 I am trying to access the .net web services using rails app. But I am not able to get the response. Here are my code, To create the api controller for define the method of .net web service app/apis/hello_world_api.rb class HelloWorldApi < ActionW

[Rails] MySQL and Postgres

2012-05-29 Thread Miguel A.
Hello all, I'm a RoR begginer and am developing my app using MySQL but Heroku uses Postgres, so my arel isn't working quite properly. I've searched about the outputted error but in my case, since I'm doing a query between a HABTM table, things aren't going so well. Basically, a Product has_and_b

[Rails] Re: Relationship issue with activerecord rails

2012-05-29 Thread Steve Knit
Hello Jeremy, thanks for providing me your experience and quick response! Here is my migration, sorry for being such a newb [loluser@fedora migrate]$ cat 20120527225053_create_pets.rb class CreatePets < ActiveRecord::Migration belongs_to :admin def self.up create_table :pets do |t|

Re: [Rails] Re: Relationship issue with activerecord rails

2012-05-29 Thread Jeremy Walker
On 29 May 2012 13:14, Steve Knit wrote: > Thanks for pointing me to @pets = admin.pets.all but now I'm getting the > error > >ActiveRecord::StatementInvalid in PetsController#index > >SQLite3::SQLException: no such column: pets.admin_id: SELECT > "pets".* FROM "pets" WHERE ("pets".admin_i

[Rails] Re: Relationship issue with activerecord rails

2012-05-29 Thread Steve Knit
Thanks for pointing me to @pets = admin.pets.all but now I'm getting the error ActiveRecord::StatementInvalid in PetsController#index SQLite3::SQLException: no such column: pets.admin_id: SELECT "pets".* FROM "pets" WHERE ("pets".admin_id = 1) Rails.root: /home/heptagone/dev/app2/d

[Rails] Re: oauth for facebook and twitter

2012-05-29 Thread Matt Jones
On Monday, 28 May 2012 11:18:53 UTC-4, Ruby-Forum.com User wrote: > > Hi, > > i need a user sign in page which has user name and password, which uses > oauth which allows us to post tweets to twitter and post to facebook as > well. > What is the best method to proceed? Any suggestions? > > I

Re: [Rails] Relationship issue with activerecord rails

2012-05-29 Thread Jeremy Walker
On 29 May 2012 12:56, Steve Knit wrote: > I am still learning Rails, I've read some books and did some hands on at > codeschool.com and now I'm trying to write my first simple app from > scratch. > > I'm using devise for authentication, but since i still kinda suck at > rails, I haven't gotten em

[Rails] Relationship issue with activerecord rails

2012-05-29 Thread Steve Knit
I am still learning Rails, I've read some books and did some hands on at codeschool.com and now I'm trying to write my first simple app from scratch. I'm using devise for authentication, but since i still kinda suck at rails, I haven't gotten email confirmation working so currently, for testing pu

[Rails] Re: Declaring list of string constnats for app

2012-05-29 Thread Michael Baldock
Cheers both, I like the sound of the i18n method, for the localization potential, that sounds very useful. Dave - it's good to also know where to put files so that they're automatically loaded as well, cheers for the tip. MIke -- Posted via http://www.ruby-forum.com/. -- You received this

Re: [Rails] Installed RVM-Ruby-Rails NOT available after closing terminal window!!

2012-05-29 Thread Gautam Rege
You probably haven't updated your .rc files. If you're using bash, update the .bashrc with: source "$HOME/.rvm/scripts/rvm" - @gautamrege On Mon, May 28, 2012 at 1:35 PM, Ram Ayyalaraju wrote: > I have installed rvm-ruby-rails (all latest versions) and it works fine as > long as I'm in that te

[Rails] Re: How to disable has_secure_password validation when a condition is true?

2012-05-29 Thread bleakwood
This does not work with has_secure_password because this module automatically adds this validation: validates_presence_of :password_digest so no matter how you change the condition of validation in your own model it just doesnt work. The solution I can think of is to write your own has_secure_

[Rails] Lectura de registros desde Rails

2012-05-29 Thread Sandy Ramírez
Al inicializar Rails en una aplicacion este recorre, cada registro dentro de la base de datos?, si es asi como evitarlo? When rails startup does it loop through all DB registers? If it does, how can we possibly avoid it? -- You received this message because you are subscribed to the Google Grou

[Rails] HTTP request synchronization in rails

2012-05-29 Thread Rafi A
Hi, I am executing a HTTP request for more number of times concurrently using Jemetr. I want each thread possessing one request at any cost. Means that when the first thread processing one request, the next request exist in another thread shouldn't allow to go in .. until or unless the first threa

[Rails] Installed RVM-Ruby-Rails NOT available after closing terminal window!!

2012-05-29 Thread Ram Ayyalaraju
I have installed rvm-ruby-rails (all latest versions) and it works fine as long as I'm in that terminal service window. Once i close it and open new terminal window; all of them disappear/ *installed things are lost!!*. If i install them again, in that window they work fine. It's very varied. Any

[Rails] Re: oauth for facebook and twitter

2012-05-29 Thread Nicholas Ng
you can go for omniauth. For facebook posting ,you can go for koala . On Monday, May 28, 2012 11:18:53 PM UTC+8, Ruby-Forum.com User wrote: > > Hi, > > i need a user sign in page which has user name and password, which uses > oauth which allows us to post tweets to twitter and post to facebook a