[Rails] Getting model column names

2012-05-21 Thread Paulo Carvalho
Hello, I am writing a RoR application that connects to a couchDB database using couchrest_model. The definition of my model is the following one: class BdsDataAuthor CouchRest::Model::Base property :id, Integer property :first_name, String property :last_name, String end I would like

[Rails] Active Admin help

2012-05-21 Thread Roy
I have installed active admin and also add my model -controller rate_professor there...I can add/delete/edit data using active admin ...but if I click on submit button of my form in rate_professor controller ... I can see whatever I added in the index page but I don't want to see

[Rails] Calling destroy in a has_many_and_belongs_to and has_many :through

2012-05-21 Thread Mauro
I've noticed that if I use associations with has_many_and_belongs_to and i call a destroy method on an object of the association, the record in the join table is automatically deleted. If I use has_many :though, for example: Category has_many :categorizations has_many :products, :through =

Re: [Rails] Help with many-to-many nested form

2012-05-21 Thread Abram
Colin, thanks for your response. I have moved a bit further on my original problem of updating the through table. I now have in my *controller*: def new @style = Style.new @style.stylefeatures.build @features = Feature.all end def create @style = Style.new(params[:style])

Re: [Rails] Help with many-to-many nested form

2012-05-21 Thread vishal singh
https://github.com/vishalsingh/multiple_upload_photo check this may be helpful for you On Mon, May 21, 2012 at 3:08 PM, Abram funkdif...@gmail.com wrote: Colin, thanks for your response. I have moved a bit further on my original problem of updating the through table. I now have in my

[Rails] How to configure postgresql databases on different drives ?

2012-05-21 Thread sreid
Is it possible to configure postgresql so that the development database is on one drive, and the test database is on another drive (an SSD in this case) ? Can this be done with database.yml, or some other method ? I'm using Windows 7. -- You received this message because you are subscribed to

[Rails] ERROR: could not find gem ferret locally or in a repository

2012-05-21 Thread Amir Z.
When i am installing ferret. It is giving following error. ERROR: could not find gem ferret locally or in a repository. Any help is appreciable. Thanks Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

Re: [Rails] Getting model column names

2012-05-21 Thread Guilherme Dutra
*columns*(table_name, name = nil) *public* Returns an array of Columnhttp://apidock.com/rails/ActiveRecord/ConnectionAdapters/Column objects for the table specified by table_name. See the concrete implementation for details on the expected parameter values. Try this. On Mon, May 21, 2012 at

Re: [Rails] Getting model column names

2012-05-21 Thread Guilherme Dutra
Ah sorry, I didn't see that you aren't using Active Record... On Mon, May 21, 2012 at 8:59 AM, Guilherme Dutra guipereir...@gmail.comwrote: *columns*(table_name, name = nil) *public* Returns an array of Columnhttp://apidock.com/rails/ActiveRecord/ConnectionAdapters/Column objects for the

[Rails] Re: Getting model column names

2012-05-21 Thread Matt Jones
On Monday, 21 May 2012 01:02:43 UTC-5, Ruby-Forum.com User wrote: Hello, I am writing a RoR application that connects to a couchDB database using couchrest_model. The definition of my model is the following one: class BdsDataAuthor CouchRest::Model::Base property :id, Integer

[Rails] Gallery in RoR

2012-05-21 Thread Lauris Zaicevs
Hi all! I want to create a simple gallery in Ruby on Rails app, where i can upload, edit and delete it. Could you suggest some tutorilal, how to create that? Thank you. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups

[Rails] HTTP authentication.

2012-05-21 Thread victor Arul
Does the code. http_basic_authenticate_with :name=foo :password=bar will this work? -- 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

[Rails] basic application descriptiion.

2012-05-21 Thread victor Arul
Dear ones. I am new to RoR. Can anyone suggest me a best book or website were i can easily understand the RoR concepts and procedure to create an application..? Thank you.! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: Getting model column names

2012-05-21 Thread Paulo Carvalho
Thanks for your answer. I will try the properties_with_values method to see if it returns what I want. Best regards Matt Jones wrote in post #1061503: On Monday, 21 May 2012 01:02:43 UTC-5, Ruby-Forum.com User wrote: property :first_name, String Any idea/suggestion to solve this problem?

[Rails] CouchDB accessing composed column

2012-05-21 Thread Paulo Carvalho
Hello In my RoR application, I am using Couchrest_model to access a CouchDB database. I have a model which represents an scientific Article. I am going to simplify my model to explain it better. An article can have a title, a year and one or more authors. In the couchDB database, an article can

[Rails] Re: CSRF tokens for mobile apps

2012-05-21 Thread Jim
I have an existing rails backend website which makes json ajax calls to my server and I was passing csrf tokens in every ajax call. Now,I am developing a mobile iOS app to use the same backend and send calls in json. However, mobile requests are failing with Can't verify CSRF token

[Rails] Rendering partial views with ajax calls in rails 3.1

2012-05-21 Thread Joao Martins
Hi, i'm starting now with rails, and i have simply question. I need to render two partials in one ajax call: I have the following controller: # GET /hosts/1 # GET /hosts/1.json def show @host = Host.find(params[:id]) respond_to do |format| format.html #show.html format.js

Re: [Rails] Gallery in RoR

2012-05-21 Thread Bill Walton
Hi Lauris, On Mon, May 21, 2012 at 8:56 AM, Lauris Zaicevs li...@ruby-forum.com wrote: Hi all! I want to create a simple gallery in Ruby on Rails app, where i can upload, edit and delete it. Could you suggest some tutorilal, how to create that?

Re: [Rails] i want a rails job

2012-05-21 Thread Lupu Alexandru Emil
What country? What city ? On May 16, 2012, at 6:39 PM, Alex G wrote: hi, all i want a rails job, part time or remotely i have worked with rails for 4 years,i just want to learn english and do not care about the salary of this job if you hava, contact me! -- signature.asc

Re: [Rails] i want a rails job

2012-05-21 Thread Jeremy Walker
Hello. England, Birmingham. On 21 May 2012 19:21, Lupu Alexandru Emil gang.al...@gmail.com wrote: What country? What city ? On May 16, 2012, at 6:39 PM, Alex G wrote: hi, all i want a rails job, part time or remotely i have worked with rails for 4 years,i just want to learn english

Re: [Rails] basic application descriptiion.

2012-05-21 Thread Colin Law
On 21 May 2012 15:06, victor Arul li...@ruby-forum.com wrote: Dear ones. I am new to RoR. Can anyone suggest me a best book or website were i can easily understand the RoR concepts and procedure to create an application..? railstutorial.org is good and is free to use online. Also look

[Rails] Rails developer required.

2012-05-21 Thread Suraj B.
If you are experienced rails developer please let me know. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe

[Rails] Re: javascript - railscast 205

2012-05-21 Thread Christopher D.
azizmb.in wrote in post #1061246: Great thanks! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this

[Rails] Rendering partial views with ajax calls in rails 3.1

2012-05-21 Thread Joao Martins
I'm starting now with rails, and i have simply question i think. I need to render two partials in one ajax call: I have the following controller: # GET /hosts/1 # GET /hosts/1.json def show @host = Host.find(params[:id]) respond_to do |format| format.html

[Rails] Re: Error installing therubyracer

2012-05-21 Thread Rocky
Rails hosts, for instance Heroku, are strongly advising against therubyracer because of memory usage. I removed therubyracer from my gems and just did $sudo apt-get install nodejs. Not sure if that is the preferred method, but it works for me. On Saturday, May 19, 2012 4:36:22 PM UTC+1, tfp44

[Rails] EventCalendar

2012-05-21 Thread faelvieir...@yahoo.com.br
Hello, I'm using the gem EventCalendar an application. The example is running perfectly. class CreateEvents ActiveRecord :: Migration def change create_table: events do | t | t.date: start_at t.date: end_at t.boolean: all_day t.timestamps end end end

[Rails] Error : can't dup NilClass, in Heroku

2012-05-21 Thread johan rincon
Hi, The application is deployed on Heroku, is based on Ruby 3.2.1 and Rails 1.9.2. Sometimes a function of my props starts throwing this error StringUtils:dateTimeFromString, str , *can't dup NilClass* and I don't understand the cause. it's my function: require 'time' module StringUtils

[Rails] Re: Rendering partial views with ajax calls in rails 3.1

2012-05-21 Thread Frederick Cheung
On May 21, 1:45 pm, Joao Martins joao.rib.mart...@gmail.com wrote: I'm starting now with rails, and i have simply question i think. I need to render two partials in one ajax call: I have the following controller:     # GET /hosts/1     # GET /hosts/1.json     def show        @host =

Re: [Rails] Rendering partial views with ajax calls in rails 3.1

2012-05-21 Thread Walter Lee Davis
On May 21, 2012, at 8:45 AM, Joao Martins wrote: I'm starting now with rails, and i have simply question i think. I need to render two partials in one ajax call: I have the following controller: # GET /hosts/1 # GET /hosts/1.json def show @host = Host.find(params[:id])

Re: [Rails] EventCalendar

2012-05-21 Thread Walter Lee Davis
On May 21, 2012, at 11:07 AM, faelvieir...@yahoo.com.br wrote: Hello, I'm using the gem EventCalendar an application. The example is running perfectly. class CreateEvents ActiveRecord :: Migration def change create_table: events do | t | t.date: start_at t.date:

Re: [Rails] Error : can't dup NilClass, in Heroku

2012-05-21 Thread Jeremy Walker
On 21 May 2012, at 17:07, johan rincon nahoj28naho...@gmail.com wrote: Hi, The application is deployed on Heroku, is based on Ruby 3.2.1 and Rails 1.9.2. Sometimes a function of my props starts throwing this error StringUtils:dateTimeFromString, str , can't dup NilClass and I

[Rails] how to not encode only one attribute of model when calling render :json = model

2012-05-21 Thread Herman
Cross post from SO, hoping to get more insight here. I've got a column called message in one of my model (UserMessage) in rails. Now message can contain emoticon value which I passed in from an iphone app. For example, the smiley icon has the unicode value of U+1F604 and since it's passed in

[Rails] Re: Error installing therubyracer

2012-05-21 Thread Vivek G.
Just wanted to mention that I performed the steps mentioned by Meck Z. on osx lion to deal with the same issue. (was playing with fatfreecrm which now apparently uses therubyracer). Thanks! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

Re: [Rails] Chain scopes with OR

2012-05-21 Thread Gustavo de Sá Carvalho Honorato
The problem of the first solution is that find_in_coverage | find_known_missing combined that way does not return a scope. It returns two arrays each and applies | operator on the result. See: http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-7C I've looked arel docs (in fact, I just found

Re: [Rails] Chain scopes with OR

2012-05-21 Thread Jeremy Walker
On 22 May 2012 01:58, Gustavo de Sá Carvalho Honorato gustavohonor...@gmail.com wrote: The problem of the first solution is that find_in_coverage | find_known_missing combined that way does not return a scope. It returns two arrays each and applies | operator on the result. See:

Re: [Rails] Chain scopes with OR

2012-05-21 Thread Rogerio Medeiros
try escopo: find_visibles, lambda { find_in_coverage.find_know_missing} 2012/5/21 Gustavo de Sá Carvalho Honorato gustavohonor...@gmail.com The problem of the first solution is that find_in_coverage | find_known_missing combined that way does not return a scope. It returns two arrays each

[Rails] Kernel#send behaving strangely with ActiveRecord attribute methods

2012-05-21 Thread Marcelo de Moraes Serpa
I'm going through an weird behavior with Kernel#send and *I think* it might be related to ActiveRecord (I'm using Rails 2.3.11). I have a User model that has the following fields: email: String status: Integer (among others) If I do: some_arg_that_might_come_in_a_local_var = true method =