similar to: Subfolders in Rails applications (newbie)

Displaying 20 results from an estimated 200 matches similar to: "Subfolders in Rails applications (newbie)"

2008 Oct 14
4
replace_html not working
hallo, everyone can anybody help me? i did add my code under ENGINES as a module in a project. before the change , all worked . and the differenz between both is only about application''s environment, before is Ruby version 1.8.6 (i486-linux) RubyGems version 1.1.1 Rails version 2.0.2 Active Record version 2.0.2 Action Pack version 2.0.2
2010 Apr 05
1
`test': wrong number of arguments (1 for 2) (ArgumentError)
Hi, Im trying to change the syntax of my tests to the test "some method" do ... end syntax from the existing def test_some_method ... end syntax. Im pasting my test code below. Im getting the error in the subject line if I try to run the test as a ruby script from the console. require File.dirname(__FILE__) + ''/../test_helper'' require
2006 Jan 08
9
URL/Site structure
Greetings, I''m fairly noob with rails and making my first DB driven site with it. I''m using the scaffold generator to develop the admin side of my site (admin_controller) I have three sections that I want to have the administrator edit, and I want to call these from the admin controller that has a layout with navigation to these three sections. When using the scaffold
2011 Jun 01
9
Routes and Namespace
Could someone explain me how to work with routes and namespaces? I need to understand it urgent to build an application. Thanks! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/aFVOeUZzVUlsUUFK. To post to this group, send email to
2006 Mar 27
9
rename app>controller subfolder crashes app
Help, I changed a folder name in my app>controller from admin to company and now I get a company is not a class error. I do not have any custom routes set and have changed all references to admin, no joy. Does ruby / rails have a cache of the names? -- Posted via http://www.ruby-forum.com/.
2011 Aug 25
0
Rails 3.0 Fleximage Error Errno::EACCES
Hi, I''m using Fleximage on my website so users can upload avatars. I recently upgraded to Rails 3.0 and switched host to slicehost.com. I successfully installed imagemagick and the gems rmagick and fleximage. Everything seems to be working fine except when I try to edit my account and upload an avatar. After selecting an avatar and click the update account button I get the following
2009 Jun 01
0
ArgumentError (interning empty string)
Hello, I am trying to send an email out on registration for confirming and I am thrown this error. I am unable to understand as nothing is nil in the class which I am passing to the Mailer. Please do help me. The stack trace follows: ArgumentError (interning empty string): app/controllers/accounts_controller.rb:103:in `register'' app/controllers/accounts_controller.rb:43:in
2005 May 01
5
Example using Builder::XmlMarkup and .rxml files?
Greetings, I''m a newby to both "R"s in RoR. I would like to use Builder::XmlMarkup to generate my pages. If there is a working downloadable example somewhere, that would probably be enough. Otherwise, here''s what I want to do: With the following controller: class AccountsController < ApplicationController layout ''accounts'' model :account
2013 Mar 07
3
Expected response to be a <:redirect>, but was <200>
Hey i am new to testing on rails and i have the following test written describe ''GET search'' do it ''finds a named account directly'' do get :search, name: ''test'' expect(response).to redirect_to(account_path(''test'')) end I have been getting the following error SystemAccountsController GET search finds a
2011 Jul 21
4
Validation depends on Controller
I know in the model we can add validations. But how about if I need different validations depending on the controller. For example... 1) if the User is being created from the accounts controller, I want to REQUIRE the username be entered. 2) if the User is being created from the users controller, I want to NOT REQUIRE the username. validates_presence_of :username, :on => :create requires the
2006 Jun 04
8
Remove item from session
Hi there, when i do this: session[:myItem] = ''foo'' session[:myItem] = nil the item :myItem is removed from the session. But this: session[''myItem''] = ''foo'' session[''myItem''] = nil doesn''t remove ''myItem'', it''s empty but still in the session. Any suggestion ? Thanks in advance. mic
2007 Nov 28
6
Newbie question
I installed Rspec and am getting the following failure: $ sudo gem install rspec Successfully installed rspec-1.0.8 Installing ri documentation for rspec-1.0.8... Installing RDoc documentation for rspec-1.0.8... $ spec -v RSpec-1.0.8 (r2338) - BDD for Ruby http://rspec.rubyforge.org/ $ cat acct.rb describe Account, " when first created" do it "should have a balance of $0"
2008 Jul 10
0
User.protected_attributes returning empty Set instead of nil -- causing activerecord/lib/base:2307 to raise
I have a model that uses attr_accessible, and in my tests I get this: RuntimeError (Declare either attr_protected or attr_accessible for User, but not both.): /var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:2307:in `remove_attributes_protected_from_mass_assignment'' /var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:2114:in
2008 Jan 24
1
Uploading files: wrong number of arguments (1 for 0)
I am trying to upload a file (pretty simple stuff right?), but keep getting the argument error. I have cross referenced what I have to prior uses and cannot find any errors with what I have. --------- /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:18:in `initialize''
2006 Jul 21
15
RoRED a free Ruby on Rails editor for Windows
Hi. On http://www.plasmacode.com you can download RoRED, a free IDE for Ruby on Rails apps, only for Windows. It has some interesting features like tab-grouping of related MVC files, code navigation into methods (ctrl+click), and more. Best regards, Marcus. http://www.plasmacode.com -- Posted via http://www.ruby-forum.com/.
2010 Jun 20
7
rspec-rails 2.0.0.beta.12 showing undefined method error for route_to
First of all, I''ve been trying to find an answer for this problem all over the internet without luck. The thing is that I am using RVM with ruby 1.9.2-head and I created a new empty gemset. Then I installed bundler gem with: gem bundler install That installed the library into the /Users/damselem/.rvm/gems/ ruby-1.9.2-head at rails3/gems directory. Then I went to my rails 3 app
2006 Mar 10
1
Problem rendering components
I have an AccountsController that inherits from ApplicationController. In ApplicationController I define a generic layout. In this layout I render @title that is actually assigned in the AccountsController but has a default value in ApplicationController. In the layout template, I also have the standard contents_for_layout and lastly, I have a render_component. The component called from the
2008 Feb 04
1
Error on nil.build
I can''t figure out why I am getting an error for one of the tests below: ======================== describe AccountsController, "POST" do before :each do @user = mock_model(User) @account = mock_model(Account, :id => 1, :valid => true, :save => true, :users => mock("users", :build => @user)) Account.should_receive(:new).and_return(@account)
2012 Mar 06
0
Devise/Cancan Signout User On Controller Action
I have implemented Devise for Authentication and Authorization in ROR application everything seems fine but getting one issue. I have two modals "Account" and "Transactiona" , and so two controllers respectively. My Transaction Index view call one of Account Controller method like this
2007 Apr 18
2
[PATCH 3/10] I386 mcheck p4 grotesque and needless warning fix.patch
No, just no. You do not use goto to skip a code block. You do not return an obvious variable from a singly-inlined function and give the function a return value. You don't put unexplained comments about kmalloc in code which doesn't do dynamic allocation. And you don't leave stray warnings around for no good reason. Also, when possible, it is better to use block scoped variables