[Rails] Issue with mering ActiveRecord query results

2013-08-07 Thread Sumit Srivastava
class ABC def self.active self.live.where('starts_at <= ?', Time.now).where('(ends_at > ? || ends_at IS NULL)', Time.now) end def self.recently_completed` self.completed.where("completed_at > ?", 2.days.ago)` end The issue is when I do: (ABC.active + ABC.recently_completed).c

[Rails] Duplicating an instance which is a duplicate of another

2013-07-17 Thread Sumit Srivastava
Hi, Following is the code, shared_context "of cloning" do > let(:cloned_record) {donor.dup} > let(:second_cloned_record) {donor.dup} > * let(:clone_of_cloned) {cloned_record.dup}* > > it "returns new record" do > cloned_record.should be_new_record > end > > it "saves returned reco

[Rails] Sending errors in response when using 'render'

2013-05-09 Thread Sumit Srivastava
Hi, I have a partial which is being rendered in a view in controller A. This partial has a form which calls 'update' action in controller B. If update fails I have the render back the original view again with the proper errors. I used, render :action => :show This show action is actually is t

Re: [Rails] Re: Rails adding computed field to a join of multiple tables

2013-03-15 Thread sumit srivastava
On 15 March 2013 16:41, tamouse mailing lists wrote: > On Thu, Mar 14, 2013 at 5:16 AM, Sumit Srivastava > wrote: > > Also I did try it this way, > > > > arel = OfferOrder.includes(:a, :b).joins(:c).select('(CASE WHEN > > ISNULL(c.fields2) THEN c.fields1 ELSE

[Rails] Re: Rails adding computed field to a join of multiple tables

2013-03-14 Thread Sumit Srivastava
Also I did try it this way, arel = OfferOrder.includes(:a, :b).joins(:c).select('(CASE WHEN ISNULL(c.fields2) THEN c.fields1 ELSE c.field2 END) ') Got error, ActiveModel::MissingAttributeError (missing attribute: a_id): I did join on three tables. > > arel = OfferOrder.includes(:a, :b, :c) a

[Rails] Rails adding computed field to a join of multiple tables

2013-03-14 Thread Sumit Srivastava
I did join on three tables. arel = OfferOrder.includes(:a, :b, :c) arel = arel.select('(CASE WHEN ISNULL(c.field2) THEN c.field1 ELSE c.field2 END) AS fraud') but when I run my code it gives error that (Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to

[Rails] SQL constraints through migrations

2013-02-25 Thread Sumit Srivastava
Hi, I have to add contraints (CHECK) on a sql table through rails migration. How should I? I googled and got to know about using something as follows, def self.up execute "ALTER TABLE table_name ADD CONSTRAINT check_constraint_name CHECK (check_column_name IN (1, 2, 3) )" end But am not su

Re: [Rails] Re: Associations

2013-02-19 Thread sumit srivastava
ne. How to do that? Thanks, Sumit > > On Friday, 8 February 2013 11:17:41 UTC+5:30, Sumit Srivastava wrote: >> >> Hi, >> >> I have a model PlayerScore with unique key as (dt, player_id). I have >> create associations between Player model and PlayerScore model

Re: [Rails] Rspec not able to detect existing route

2013-02-13 Thread sumit srivastava
On 13 February 2013 18:32, Colin Law wrote: > On 13 February 2013 12:31, Sumit Srivastava > wrote: > > Hi, > > > > I have added a route to my routes.rb as following, > > > > get "/order/:player_id/:order", :to => 'share#order_renderer'

[Rails] Rspec not able to detect existing route

2013-02-13 Thread Sumit Srivastava
Hi, I have added a route to my routes.rb as following, get "/order/:player_id/:order", :to => 'share#order_renderer', :as => :order_feed It works for me in the app but when I am running the spec file for, it says, not route matches for this controller, action, parameters. Regards, Sumit --

[Rails] Associations

2013-02-07 Thread Sumit Srivastava
Hi, I have a model PlayerScore with unique key as (dt, player_id). I have create associations between Player model and PlayerScore model to display the score on Player screen. Had it been just the score_id as the foreign_key a simple association with belongs_to and has_one would have helped.

Re: [Rails] Re: Dislpaying validation errors from one one model to view of another.

2012-12-18 Thread sumit srivastava
I hope that helps. > > > I was sending the errors to the view from the controller. I found out that since the errors where not from the base model (User) so it wasn't displaying them. Once I added them to the base using errors.add(:base, "Error"), it started displaying

[Rails] Dislpaying validation errors from one one model to view of another.

2012-12-17 Thread Sumit Srivastava
Hi, I have a model, class UserComment belongs_to :user validates :player_id, :presence => true validates :comment, :uniqueness => { :scope => :player_id} partial "comments" from User. = simple_form_for @user, :html => {:class => 'comment-form'}, :remote => true do |f| %fieldset = f.fields

[Rails] Re: undefined method `user_id=' for #

2012-12-17 Thread Sumit Srivastava
On Sunday, 16 December 2012 19:49:11 UTC+5:30, Nikolay wrote: > > After entering data in http://localhost:3000/checkout/update/address form > i getting the following error: > > NoMethodError in Spree::CheckoutController#update > > undefined method `user_id=' for # > > > A error chunk of Developm

Re: [Rails] Thin server giving Stack level too deep error

2012-12-12 Thread sumit srivastava
On 13 December 2012 12:18, Jim Ruther Nill wrote: > > > > On Thu, Dec 13, 2012 at 1:56 PM, sumit srivastava < > sumit.theinvinci...@gmail.com> wrote: > >> On 13 December 2012 11:23, Jim Ruther Nill wrote: >> >>> >>> >

Re: [Rails] Thin server giving Stack level too deep error

2012-12-12 Thread sumit srivastava
On 13 December 2012 11:23, Jim Ruther Nill wrote: > > > > On Thu, Dec 13, 2012 at 1:48 PM, sumit srivastava < > sumit.theinvinci...@gmail.com> wrote: > >> >> On 13 December 2012 11:17, sumit srivastava < >> sumit.theinvinci...@gmail.com> wrote:

Re: [Rails] Thin server giving Stack level too deep error

2012-12-12 Thread sumit srivastava
On 13 December 2012 11:17, sumit srivastava wrote: > > On 13 December 2012 11:13, Jim Ruther Nill wrote: > >> >> >> >> On Thu, Dec 13, 2012 at 1:31 PM, Sumit Srivastava < >> sumit.theinvinci...@gmail.com> wrote: >> >>> Hi, >>

Re: [Rails] Thin server giving Stack level too deep error

2012-12-12 Thread sumit srivastava
On 13 December 2012 11:13, Jim Ruther Nill wrote: > > > > On Thu, Dec 13, 2012 at 1:31 PM, Sumit Srivastava < > sumit.theinvinci...@gmail.com> wrote: > >> Hi, >> >> I am using thin web server in my rails project. But it gives stack level >> too de

[Rails] Thin server giving Stack level too deep error

2012-12-12 Thread Sumit Srivastava
Hi, I am using thin web server in my rails project. But it gives stack level too deep error. Couldn't find any appropriate solution to this. I have tried updating the ruby but didn't help. Regards, Sumit -- You received this message because you are subscribed to the Google Groups "Ruby on R

Re: [Rails] Conditional background color of rows

2012-12-09 Thread sumit srivastava
On 10 December 2012 13:06, Jim Ruther Nill wrote: > > > > On Mon, Dec 10, 2012 at 3:34 PM, Sumit Srivastava < > sumit.theinvinci...@gmail.com> wrote: > >> Hi, >> >> I am using dataTables to render my content onto a view. I need to change >> the b

[Rails] Conditional background color of rows

2012-12-09 Thread Sumit Srivastava
Hi, I am using dataTables to render my content onto a view. I need to change the background color of a row depending upon ratio of values of two columns. How shall I proceed. I went through following page on dataTables website but it didn't work for me. http://www.datatables.net/examples/ad

Re: [Rails] Writing test cases for mysql errors

2012-12-07 Thread sumit srivastava
On 7 December 2012 14:59, Colin Law wrote: > On 7 December 2012 06:02, Sumit Srivastava > wrote: > > Hi, > > > > I just encountered a MySql error for ambiguous columns. I fixed it but I > > need to write test cases for such happenings to avoid any such instance >

[Rails] Writing test cases for mysql errors

2012-12-06 Thread Sumit Srivastava
Hi, I just encountered a MySql error for ambiguous columns. I fixed it but I need to write test cases for such happenings to avoid any such instance in future. Regards, Sumit -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to

Re: [Rails] Joining two tables giving ambigous column error on mysql

2012-12-06 Thread sumit srivastava
Thanks. Got it fixed. Regards Sumit Srivastava The power of imagination makes us infinite... On 7 December 2012 10:07, sumit srivastava wrote: > On 7 December 2012 09:54, Jordon Bedwell wrote: > >> On Thu, Dec 6, 2012 at 10:20 PM, Sumit Srivastava >> wrote: >> &g

Re: [Rails] Joining two tables giving ambigous column error on mysql

2012-12-06 Thread sumit srivastava
On 7 December 2012 09:54, Jordon Bedwell wrote: > On Thu, Dec 6, 2012 at 10:20 PM, Sumit Srivastava > wrote: > > I am doing a join of two tables with a column with same name in both. I > am > > using "includes" to have a full join. This is giving ambiguous column

[Rails] Joining two tables giving ambigous column error on mysql

2012-12-06 Thread Sumit Srivastava
Hi, I am doing a join of two tables with a column with same name in both. I am using "includes" to have a full join. This is giving ambiguous column error. The columns cannot be removed from either of those and renaming any of the two would involve two many changes. So, is there any way this ca

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-30 Thread sumit srivastava
On 30 November 2012 14:16, Colin Law wrote: > On 30 November 2012 06:50, sumit srivastava > wrote: > > Verified it. Don't have puts anywhere else. > > Jim asked you to post the contents of the log (log/development.log) > when you click the link. Why have you not done

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread sumit srivastava
Verified it. Don't have puts anywhere else. Regards Sumit Srivastava The power of imagination makes us infinite... On 30 November 2012 11:39, Jim Ruther Nill wrote: > > > > On Fri, Nov 30, 2012 at 1:50 PM, sumit srivastava < > sumit.theinvinci...@gmail.com> wr

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread sumit srivastava
If it were being directed to some other action, then *** should not have been printed. And when I am trying to access this parameter from the view "index.html.haml", its value is printed exactly what is being passed. Regards Sumit Srivastava The power of imagination makes u

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread sumit srivastava
On 30 November 2012 10:55, Jim Ruther Nill wrote: > > > > On Fri, Nov 30, 2012 at 1:16 PM, sumit srivastava < > sumit.theinvinci...@gmail.com> wrote: > >> On 30 November 2012 10:41, Jim Ruther Nill wrote: >> >>> >>> >

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread sumit srivastava
On 30 November 2012 10:41, Jim Ruther Nill wrote: > > > > On Fri, Nov 30, 2012 at 12:51 PM, Sumit Srivastava < > sumit.theinvinci...@gmail.com> wrote: > >> Hi, >> >> I have a controller named Users with index action. >> >&g

[Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread Sumit Srivastava
Hi, I have a controller named Users with index action. def index puts "* #{params[:city]}" ... ... end >From the view, link_to(:city, list_users_with_city_path(:city => city.name)) But when I click on this link, it doesn't prints out anything for the params. All the "*"

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread sumit srivastava
I need to add a functionality to a code someone else wrote. Just found out that, the dataTables jquery is just being used to sort and paginate the table. But the table is actually populated through controller. Regards Sumit Srivastava The power of imagination makes us infinite... On 29

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread sumit srivastava
Actually Jquery dataTables is being used to fetch the data and create the table. Regards Sumit Srivastava The power of imagination makes us infinite... On 29 November 2012 15:48, Jordon Bedwell wrote: > On Thu, Nov 29, 2012 at 4:15 AM, Colin Law wrote: > > The Rails Guide on For

[Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread Sumit Srivastava
Hi, I have a view in which a table is created with one head elements of the table are defined like, %table.data-table{'data-searchable' => 'true'} %thead %tr %th Email %th.no-sort Name %th Registered %tbody The table is populated through controller. I need to add a se

Re: [Rails] Re: Having two paths for a single action with different parameters

2012-11-28 Thread sumit srivastava
Thanks Rahul. If possible could you explain any more cases as I faced. It would be helpful. Regards Sumit Srivastava The power of imagination makes us infinite... On 28 November 2012 15:32, rahul chandra wrote: > well for understanding, If you add a symbol like(:city) in the routes

Re: [Rails] Having two paths for a single action with different parameters

2012-11-28 Thread sumit srivastava
2012 14:30, Jordon Bedwell wrote: > On Wed, Nov 28, 2012 at 2:57 AM, sumit srivastava > wrote: > > Yes, I did try this but it didn't. In fact, the custom route I defined, > if I > > define it as following it works. > > > > get '/users' => 'use

[Rails] Having two paths for a single action with different parameters

2012-11-28 Thread Sumit Srivastava
Hi, I have a controller named users and index action in it. By default I have the path get '/users' => 'users#index', :as => 'users' Now I want to create one more path with a different parameter being passed get '/users/:city' => 'users#index', :as => 'list_users' But this gives as error, No

[Rails] RoR project deployment using Nginx and Thin

2012-09-07 Thread Sumit Srivastava
Hi, I have been trying to deploy a Rails project using Nginx and thin but always displays the Default page only. I did following configurations, Step 1: Made a symlink of my project in /var/www Step 2: Installed thin and Nginx. Step 3: Added Upstream block in the nginx.conf file Step 4: Changed

Re: [Rails] Using Jquery plugin "tokenInput" with rails

2012-08-15 Thread sumit srivastava
Colin, Yes, I did. I was using wrong dom id to save the tokeninput data and that was misleading my app. Regards Sumit Srivastava The power of imagination makes us infinite... On 15 August 2012 13:36, Colin Law wrote: > On 13 August 2012 11:33, Colin Law wrote: > > On 13 August 2

Re: [Rails] Using Jquery plugin "tokenInput" with rails

2012-08-13 Thread sumit srivastava
On 13 August 2012 15:09, Colin Law wrote: > On 13 August 2012 10:19, sumit srivastava > wrote: > > > >> > > > > On 13 August 2012 14:33, Colin Law wrote: > >> > >> On 13 August 2012 09:45, Sumit Srivastava < > sumit.theinvinci...@gmail.c

Re: [Rails] Using Jquery plugin "tokenInput" with rails

2012-08-13 Thread Sumit Srivastava
On Monday, 13 August 2012 14:02:11 UTC+5:30, Colin Law wrote: > > On 13 August 2012 08:40, sumit srivastava > > > wrote: > > I went through the log. The contact_tokens parameter is being passed as > nil, > > i.e., "contact_tokens"=>"". &

Re: [Rails] Using Jquery plugin "tokenInput" with rails

2012-08-13 Thread sumit srivastava
I went through the log. The contact_tokens parameter is being passed as nil, i.e., "contact_tokens"=>"". This is happening even when the text field is actually populated. Regards Sumit Srivastava The power of imagination makes us infinite... On 13 August 2012 12:27, Col

[Rails] Using Jquery plugin "tokenInput" with rails

2012-08-12 Thread Sumit Srivastava
Hi, I made a contact manager app using rails. I added TokenInput plugin to introduce an instant contact search functionality in it. Tried following a railscast http://railscasts.com/episodes/258-token-fields but have been struggling with it for a while. Following is the code I use in my view

Re: [Rails] Same name action and attribute in a model

2012-07-30 Thread sumit srivastava
By "didn't execute", I mean that when I use "password" as name of this method, it is called some way. But the same doesn't happens when it is named as "passwordtext", i.e., it is not even called. Regards Sumit Srivastava The power of imagination make

[Rails] Rails with Cassandra

2012-07-30 Thread Sumit Srivastava
I am trying to integrate Cassandra with Rails using the method described on this page, https://github.com/dtmconsultoria/cassandra-integration I made a small change. I created a rails app with two variables, Name and Age. Name of the app is user. After I did this, I ran the rails server. Everyt

Re: [Rails] Same name action and attribute in a model

2012-07-29 Thread sumit srivastava
enamed the password_field_tag in the view as "passwordtext". Doing this didn't help at all as the passwordtext method didn't execute. So, the problem how should I rename my variables to make it work. Regards Sumit Srivastava The power of imagination makes us infinite... On 29

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
Right now I have renamed it to passwordtext but originally it was password. I wrote about its behavior when named as password. Regards Sumit Srivastava The power of imagination makes us infinite... On 27 July 2012 19:39, Michael Pavling wrote: > On 27 July 2012 11:52, sumit srivast

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
me same as that of the column *password. Am I right? *Regards Sumit Srivastava The power of imagination makes us infinite... On 27 July 2012 16:12, Michael Pavling wrote: > On 27 July 2012 11:37, sumit srivastava > wrote: > > This is what I receive, > > > > SystemStack

[Rails] Re: Same name action and attribute in a model

2012-07-27 Thread Sumit Srivastava
User.random_string does not exists any more. So had to use * SecureRandom.hex(10)* On Friday, 27 July 2012 11:52:43 UTC+5:30, Sumit Srivastava wrote: > > I have been following following tutorial to make a user login session. > http://www.aidanf.net/rails_user_authentication_tutorial &

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
is used to store the user info into database. Line 31 reads as follows,* @user = User.new(params[:user])* Regards Sumit Srivastava The power of imagination makes us infinite... On 27 July 2012 16:00, Michael Pavling wrote: > On 27 July 2012 11:13, sumit srivastava > wrote: > > D

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
ord_field_tag* in my form as * passwordtext*. But when I do so, it is not executed. Instead if I rename the password_field_tag and the attr_accessor as* password *only, it is executed but the stackerror comes in. Regards Sumit Srivastava The power of imagination makes us infinite... On 27 July

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
I am not exactly following the tutorial. I have customized things according to my requirements. Regards Sumit Srivastava The power of imagination makes us infinite... On 27 July 2012 15:12, sumit srivastava wrote: > This is the complete model. I am trying to encrypt the passw

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
end > > def passwordtext=(pass) > #debugger > @password1=pass > self.salt = SecureRandom.hex(10) if !self.salt? > self.password = User.encrypt(@password1, self.salt) > end > > def self.encrypt(pass, salt) >Digest::SHA1.hexdigest(pass+salt) >

[Rails] Same name action and attribute in a model

2012-07-26 Thread Sumit Srivastava
I have been following following tutorial to make a user login session. http://www.aidanf.net/rails_user_authentication_tutorial I used the following action to encrypt the password. > def password > #debugger > @password1=pass > self.salt = SecureRandom.hex(10) if !self.salt? >

[Rails] Re: "Destroy record" call deletes session

2012-07-26 Thread Sumit Srivastava
What else could be the solution? On Thursday, 26 July 2012 10:41:34 UTC+5:30, Sumit Srivastava wrote: > > Hi, > > I have been trying to develop a sample app to create user logins and > provide them personalized contact list with several features as of view, > delete, edit, sen

[Rails] "Destroy record" call deletes session

2012-07-25 Thread Sumit Srivastava
Hi, I have been trying to develop a sample app to create user logins and provide them personalized contact list with several features as of view, delete, edit, send mail, etc. Everything is working fine except the destroy action. Every time I call it, the session[:user] variable is destroyed,

Re: [Rails] Re: All actions executing twice in rails app

2012-07-25 Thread sumit srivastava
Frederick! I deleted all the pre-compiled assets in public folder and restarted my machine. It worked! Thanks :-) Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 20:49, Frederick Cheung wrote: > > > On Jul 25, 10:25 am, sumit srivastava >

Re: [Rails] All actions executing twice in rails app

2012-07-25 Thread sumit srivastava
Tried it now. Didn't help. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 15:42, Gintautas Šimkus wrote: > I always forget, but you might want to try EXPLICITLY "true" at the end > (if session[:user] is FALSE). I mean just use r

Re: [Rails] All actions executing twice in rails app

2012-07-25 Thread sumit srivastava
ntactsController*. Also I have another controller *Usercontroller *which is responsible for login actions and contacts controller is responsible to manage contacts list of every user. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 15:31, Gintautas Šimku

Re: [Rails] All actions executing twice in rails app

2012-07-25 Thread sumit srivastava
Peter, I added code for session management where one user can login only using one browser at a time. Other than that I tried production mode of the app. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 15:25, Peter Hicks wrote: > > On 25 Jul 20

Re: [Rails] Re: All actions executing twice in rails app

2012-07-25 Thread sumit srivastava
I was actually looking to insert custom error pages. On Googling I got to know production mode produces error page by default. I just wanted to explore it and ran it in production mode. The production mode required some pre-compiled files so just did that. Regards Sumit Srivastava The power of

Re: [Rails] Re: All actions executing twice in rails app

2012-07-25 Thread sumit srivastava
I do have before_filter and to make sure they aren't messing up things, I ran my app after removing them but nothing changed. The same code was running fine earlier but now I am not able to get where it has got problem. Regards Sumit Srivastava The power of imagination makes us infinite...

Re: [Rails] Re: All actions executing twice in rails app

2012-07-25 Thread sumit srivastava
I am currently running my app in development mode. This log is of development mode. Am not able to deduce what exactly went wrong. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 14:53, Frederick Cheung wrote: > > > On Wednesday, July 25, 201

[Rails] All actions executing twice in rails app

2012-07-25 Thread Sumit Srivastava
I pre-compiled my app to use in production mode. And after that it started to perform every action twice. I am not able to resolve it. My log comes something like this. Started GET "/assets/lowpro.js?body=1&_=1343203450861" for 127.0.0.1 at Wed > Jul 25 13:34:10 +0530 2012 > Served asset /lowp

[Rails] request.session_options[:id] accessiblity problem

2012-07-24 Thread Sumit Srivastava
I am having problem retrieving the value for variable request.session_options[:id] from my controller. Though the same returns a proper value when accessed through a view. I am not able to understand why it is happening. -- You received this message because you are subscribed to the Google Gro

[Rails] Disallowing multiple login by same user using different browsers

2012-07-24 Thread Sumit Srivastava
Hi, I need to create an app where one user cannot login using multiple browsers. As soon as he does, the previous one logs out. I have a user table with a field named "current_sign_in_token' to store the session key generated by one login. But I am not able to retrieve the session key. Actuall

Re: [Rails] Deleting multiple contacts using check_box_tag

2012-07-23 Thread sumit srivastava
ere destroySelected is the action in controller to delete these. Code for the destroySelected action is, def destroySelected > Contact.delete_all(:id => params[:id]) > respond_to do |format| > format.html {redirect_to contacts_url} > #format.js > end >

Re: [Rails] Deleting multiple contacts using check_box_tag

2012-07-23 Thread sumit srivastava
2012 > Processing by ContactsController#destroySelected as JS > Parameters: {"contact_ids"=>"contact_ids[]"} > SQL (0.1ms) DELETE FROM "contacts" WHERE "contacts"."id" IS NULL > Redirected to http://localhost:3000/contacts > Completed 302

Re: [Rails] Deleting multiple contacts using check_box_tag

2012-07-20 Thread Sumit Srivastava
I am aware of that. But I am not able to figure out the way I should pass the parameters. I need help with that. On Friday, 20 July 2012 19:28:19 UTC+5:30, Hassan Schroeder wrote: > > On Fri, Jul 20, 2012 at 2:11 AM, Sumit Srivastava > wrote: > > > Started GET &qu

[Rails] Running a rails project of 2.3.5 on rails 3.2.6

2012-07-20 Thread Sumit Srivastava
I have been trying to upgrade the project using the method on several blogs but failed to do so as the first command to install the plugin itself fails. Following is the error I get, sumit@sumit:~/Downloads/railscasts-198-edit-multiple-individually-02eb1c8/store$ ruby script/plugin install git

Re: [Rails] Deleting multiple contacts using check_box_tag

2012-07-20 Thread Sumit Srivastava
ontacts" WHERE "contacts"."id" IS NULL Rendered contacts/destroySelected.js.erb (0.0ms) Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.1ms) On Thursday, 19 July 2012 19:57:39 UTC+5:30, Hassan Schroeder wrote: > > On Thu, Jul 19, 2012 at 12:37 AM, Sum

[Rails] Deleting multiple contacts using check_box_tag

2012-07-19 Thread Sumit Srivastava
I have build a contacts page which displays a number of contacts. I have attached a check_box_tag with each row of these. And then a button to delete those selected. But it is not working. Following is the code snipet, _contact.html.erb > <% @contacts.each do |contact| %> > > <%= check_b

[Rails] Using AJAX on rails page

2012-07-16 Thread Sumit Srivastava
I am a newbie to Rails. Trying to make a small contact form app. I want to use AJAX to add new contact. I want a dialog to open when I click on 'New Contact' button and then entering details over there. I did following steps: 1] added :remote => true to the new_contact_path line on index.html.er