similar to: explanation required on def method = (.)

Displaying 20 results from an estimated 20000 matches similar to: "explanation required on def method = (.)"

2010 Apr 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor In Expense#new there''s a form with a Vendors-drop-down and a NewVendor- button. The latter button brings up Vendor#new. The Create button in Vendor#new brings up Vendor#show with Edit & Back links. I want to append a third link conditionally to Vendor#show: if the Expense#new form led to the Vendor#show
2011 Mar 20
10
Unable to install mysql2 gem on windows 7
I am getting the following error message while installing, let me know if any one needs some more details. I followed instruction from "https://github.com/oneclick/rubyinstaller/wiki/Development-Kit". I am using ruby 1.9.2p136 (2010-12-25) [i386-mingw32]. E:\work_desk\trunk>gem install mysql2 -v 0.2.4 Temporarily enhancing PATH to include DevKit... Building native extensions. This
2009 Sep 09
4
undefined method `attr_accessor' for #<CustomersControl
pleas help -- Posted via http://www.ruby-forum.com/.
2011 Aug 03
14
[root :to => "home#index"] not working
I have done the changes in the file config/routes.rb as mentioned in the Rails Guides tutorial, but when I try to open: http://localhost:3000 the page is not opening. It is giving error. -- 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
2009 Oct 15
5
invalid multibyte character error
Hi. When I try to use multibyte characters in my rails controller I get an invalid multibyte characters error (<rails_app>/app/controllers/admin_controller.rb:6: invalid multibyte char (US-ASCII)). Here is my controller: contoller AdminController < ApplicationController def read @title = ''Заголовок страницы'' end end Here is my haml template extraction: ...
2013 Apr 27
4
required field for one, optional for another
rails 3.2.11 My app has User model, its one of the fields is entrepreneur:boolean. So users have two types; one is normal users, the other is professional users. For normal users, only emails and usernames are required and other fields are optional. For professional users, in addition to above, addresses and real names are required. Is there any Ruby way to set the requirement depending on the
2011 Nov 22
7
rake aborted with ruby on rails
when i run * rake db:create* * * WARNING: ''require ''rake/rdoctask'''' is deprecated. Please use ''require ''rdoc/task'' (in RDoc 2.4.2+)'' instead. at /home/vishnu/.rvm/gems/ruby-1.8.7-p352-D9TI4Ms3gBgeRYYz77F+sQ@public.gmane.org/gems/rake-0.9.2.2/lib/rake/rdoctask.rb DEPRECATION WARNING: Rake tasks in
2012 Nov 09
8
method conditional option pattern
When I have this pattern sign_me(@user, :event => :authentication, :subdomain => subdomain) how can I write it to avoid sending the :subdomain option if subdomain.nil? ( if possible ..) sign_me(@user, :event => :authentication #?, :subdomain => subdomain unless subdomain.nil? ) -- You received this message because you are subscribed to the Google Groups
2006 Jul 15
8
Urgent! -- need suggestion
hi all, I am starting to learn ruby and using ruby on rails. I have one question. I want to create a webpage that has two sections. The right section has all the tags (stored in a MySQL table) and in the section I display websites related to selected tag. I am not sure how to do this as I have two different actions to be fired in every webpage. Any suggestion is most welcomed Regards,
2011 Jan 03
4
Changes method: displayed nil to blank change
Hi Here I am trying to get the details of changed fields in update method I got those fields by changes method. #obj.changes But problem is that I got changes in following ways even when I am not updating anything. obj.changes {"address"=>[nil, ""]} This is what I don''t want. I want only those changes which are text to blank or blank to text or text to text..
2012 Feb 28
8
getting error:undefined method 'current'
hi all, i am getting an error ''undefined method ''current'' for 852:Fixnum'', the error coming for following line <%if @expert_pagination.current.previous%> <a href="#" class="darkgray1"
2013 Oct 24
6
undefined method `paginate' for #<Class:0x567eb98> in Rails Tutorial
Hi, I''m getting a undefined method `paginate'' for #<Class:0x567eb98> even though I have gem ''will_paginate'' installed. Inside the users_controller I have @users = User.paginate(page: params[:page ]) so I believe I set everything up to be correct. Can you figure out why the method''s undefined, despite installing the gem? -- You received this
2007 May 09
6
List of telemarketers??
Does anyone know if there is a known list of telemarketers? Something like http://whocalled.us/ with an easier access? We could all benefit if there was such a thing :-) If there is enough interest, I could put up a database that everyone can benefit from. I just need some suggestions on: (1) Adding new numbers based on community responses (some rule to sanity check) (2) Method that everyone
2007 May 09
5
Mobile Number to Mobile carrier mapping
Hi Folks, Is there a way to find out the mobile/landline carrier name based on the phone number? For example, who is the mobile carrier for (415)2345678 I had heard about some query but just don't remember how/what? Thanks in advance. Ritesh -------------- next part -------------- An HTML attachment was scrubbed... URL:
2012 Apr 14
7
undefined method `model_name' for NilClass:Class
Hi guys, I just started using Ruby on Rails. After implementing the RoR blog tutorial I started with my own data model. Sadly I am not able to get my create page running. Model: class Activity < ActiveRecord::Base validates :activity, :presence => true validates :forKids, :presence => true validates :start_date, :presence => true end Controller: class ActivitiesController <
2012 Nov 13
4
Proper use of the where method om ActiveRecord.
I am trying to determine what is going on with the following code: In AR def self.all_billables where( :is_billed => false ) end returns 2 records. def self.all_billables where( "is_billed" => false ) end also returns 2 records. In sqlite3 sqlite> select * from tests where ( "is_billed" = ''false'' ); returns 2 records. However, if I use
2011 Aug 06
7
Accessing datetime elements from hash passed to method
I''m passing hash (called ''params'') to a method. Some keys (one of them is called ''starts_at'') in that hash have date as a value (taken from datetime_select helper). I want to access the date elements like date only or time only but I''m just out of ideas. def self.new_meeting(params) str = params[''starts_at(1i)'']
2011 Jun 30
4
XCP and OpenXenCenter
I just noticed OpenXenCenter (aka OpenXenManager) that is an open source replacement for Citrix's XenCenter. This tool works with XenServer. But as per the blog entry: http://blog.xen.org/index.php/2010/02/09/xen-cloud-platform-installation/ it is also supposed to work with Xen Cloud Platform. XCP is licensed GPL2 and is a combination of multiple packages. Has the team looked at the
2010 Mar 09
3
undefined method join for STRING error
Hey all, I was converting a haml file to erb and when finished, I ran the app and got this error message: NoMethodError in Students#student_fail Showing app/views/students/student_fail.erb where line #40 raised: undefined method `join'' for #<String:0x105a5e0c8> Extracted source (around line #40): 37: 38: <% fields << render(:partial =>
2005 Sep 22
2
accessing source code in R packages
Hi, I am new the R world and would like to know how can I access source codes of standard functions in R? Thanks, Ritesh.