search for: chabgood

Displaying 20 results from an estimated 38 matches for "chabgood".

2011 May 27
14
[rails] undefined method `model_name' for NilClass:Class
Never seen the error above before, code: describe "edit action" do it "edit action should render edit template" do food = Food.create(:name=>''mooo'') # Food.any_instance.stubs(:valid?).returns(true) get :edit, :id => food.id response.should render_template(:edit) end end -------------- next part
2010 Apr 14
4
module/class question
Are these two below the same thing? 1. module X module Y class Z 2. class X::Y::Z -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2008 Jul 28
3
getting error Unknown method 'new' for a new model instance
I have a model called Test. In the controller I have @circuit = Test.new. Any ideas why rails is complaining about the ''new'' method?? --~--~---------~--~----~------------~-------~--~----~ 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
2011 Mar 10
10
JS data to rails view helper
I have a view helper like ryan bates complex forms task helper, rails 2.2.2. Anyway is there a way to send the value selected in a select menu to the helper? I am trying to do stuff without going back to the server. <%= select_tag :discout_code, options_for_select(@discount_codes)%><%= add_exclusion_date_link(''Add Existing'', JS ) %> -- You received this
2010 Mar 30
0
SystemTimer not installing correctly
Here is the output when I try to install the gem: Building native extensions. This could take a while... Successfully installed SystemTimer-1.2 1 gem installed Installing ri documentation for SystemTimer-1.2... Updating ri class cache with 6252 classes... /Users/chabgood/.gem/ruby/1.8/gems/rdoc-2.4.3/lib/rdoc/ri/driver.rb: 818: [BUG] Bus Error ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin9] Any idea why this is happening, on a mac? When I rake unpack the gem there is nothing in the directory. -- You received this message because you are subscribed to the...
2010 Nov 11
1
mongrel_rails logger
I have a live site that has a mongrel_rails instance running. When I see the process is shows that is has the -e production value set. I am not seeing any logger info in the production log. Ideas? -- 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 May 05
4
modalbox rails var interpolation
Howdy everyone. I am using modalbox which is very nice an easy to use. I have this for an edit for a company listing: <td><%= link_to(''Manage Companies'', {}, :onclick => ''Modalbox.show(\''/ companies/edit/#{company.id}\'', {width: 600}); return false;'') %></td> The link is not putting the company.id in it puts #{
2010 Dec 20
11
rails code to sql
Is there a relatively easy way to do this code in sql? @categories=Category.all.reject{|n| n.blank?}.sort{|a,b| a.name <=>b.name}.collect{|t| [t.name,t.name.downcase.gsub('' '',''_'')]} -- 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
2010 Aug 18
6
Once I added this HABTM, one of my 'through' relationships, on a non-habtm model, seems to have broke?
I''m a rails newb and have been Googling about this, but I''m still stumped. Not showing everything here, but basically it should be a pretty common setup so I''m sure others know what I''m doing wrong. - A meter can belong to many meter_groups - A meter_group can have many meters. - A user can ''subscribe'' to viewing a meter_group (Subscription)
2008 Aug 02
0
Customize Errors from method
I have this: begin sage = Net::Telnet::new( ''Host'' => sage_unit, ''Prompt'' => /\>/ ) rescue TimeoutError fail "Connection timed out, waiting to reconnect." end It outputs the text but also it gives the links for stack trace and stuff. Is there a way to just get the text back and that is all?? I do not want errors to
2008 Dec 17
0
DBI / FCGI not working
I an run a simple DBI app fine no issues. When trying it on FCGI on my server I get this error: Could not load driver (undefined local variable or method `e'' for DBI:Module) Anyone got any idea why this would error using FCGI? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2009 Jan 15
1
ruby array detect non linear data
Is there a way to detect in an array of say 1..500, if some of the numbers may be missing from the set. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group,
2009 Jan 19
0
ruby 1.9.1, dll files missing.
I install ruby 1.9.1 and I do gem install rails or mongrel and I keeps saying dll file after dll file is missing. I am on windows anyne know what to do other than install every dll it is saying it is missing?? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2009 Feb 18
0
autocomplete db query
How can I get the autocomplete to get the ID of the item and submit that instead to make a many to many relationship. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from
2009 Feb 23
1
ActiveRecord::AssociationTypeMismatch
I have 2 models: mop, has_and_belong_to_many :contacts contact, has_and_belong_to_many :mops when I save my mop Ii have the users coming in a an array: ["9",10"] I am doing this to asscociate each one to a mop: @contacts.each do |contact| @mop.contacts << contact end Contact(#44950470) expected, got String(#20837400) It is giving me the above error. Any ideas?
2009 May 11
1
rails / windows / apache question
In my app I say go to /companies/index for a modal box. Locally it runs fine because it sees /public as the root. When I put it on the server I have an alias mapped for the root. when I goto the url above it goes to the root of the server which id obviously not going to be correct. If I go to companies/index it goes to /rootofcurrentcontroller/ companies which does not work either. How do I
2009 Jul 19
3
Edit function now outputs HTML only
For some reason my new action works fine but my edit outputs nothing but raw HTML. Anyone have any ideas?
2010 Jun 30
1
rails 3 submit_to_remote
How do you do ajax functions like submit_to_remote or link_to_remote to ajax update stuff on the page in rails 3? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2010 Jul 21
1
produce html flash message with csv action
How would I produce an HTML flash message on the screen if I call an action.csv in the page? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2010 Jul 23
0
action call with a csv, but render html with flash
Does anyone know how to get an action call with csv to render html with flash? I can get it to work locally but when I upload to the server it keeps trying to render a csv file with the html inside it. unless flash[:error].blank? render :template => ''/report/action'' and return @content_type = ''text/html'' respond_to do |format|