similar to: Reloading dependencies in Edge Rails?

Displaying 20 results from an estimated 2000 matches similar to: "Reloading dependencies in Edge Rails?"

2006 Jan 16
3
routing to controller inside module
Hey, am i to stupid to find the information about how to route to a controller in a module? Maybe module support has gone! The controller is under: app/controllers/admin/my_controller.rb The my_controller.rb file looks like this: module Admin class MyController def index render :text => ''Hello!'' end end end How does a route to all controllers under module
2006 May 11
1
skipping filters
I have a simple login scheme in application.rb. Something like :requires_login is called in any controller as a before_filter. All is good, except I''m having trouble figuring out how to make the public login actions skip this before filter. Here''s what I have: application.rb skip_before_filter :requires_login, :only => [:login, :logout, :confirm_valid_login]
2006 Sep 06
3
DRb error when using rails_spec on OS X
Hi, all- I started playing with RSpec in a new Rails app. I''ve installed the plugin and bootstrapped it, and run ''script/rails_spec_runner'' (not rails_spec_server as the website currently reads, btw) in a separate shell, then in another shell I run ''script/rails_spec'' and get the following: /usr/local/lib/ruby/1.8/drb/drb.rb:837:in
2007 Nov 16
3
Route Information
Is there a method to return a hash of the route configuration based on a path? For example: magic_method(''/my_controller/my_action/my_id'') => {:controller => ''my_controller'', :action => ''my_action'', :id => ''my_id''} Thanks! Tom --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 May 09
1
Reusing a model to form and link_to.
Hy guys, Inside my app I have a form which contains user information. Sometimes a have a form with a text_field as above: <%= form_remote_tag(:html => { :action => url_for(:controller => "my_controller", :action => "my_action") }) %> <%= text_field(''my_object'', ''my_parameter'', :maxlength =>
2006 Aug 10
1
Web service SOAP URLs started failing with 1.1.4 or using 1.1.2 security patch
Railers, I''m trying to figure out why invocations to my Web service URLs work with Rails 1.1.2 but fail both with Rails 1.1.4 (and 1.1.5) and when I apply the new 1.1.2 security patch to Rails 1.1.2. It looks like they are failing with SOAP clients but succeeding with XML-RPC clients. The URL that used to work is of the form http://localhost:3000/my_controller/ServiceName/api. When I
2010 Jan 31
3
Append/Prepend to a template from controller method
I want a method in app/controllers/application.rb that can prepend/append text to whatever template gets rendered. Of course I can''t call render twice w/o getting a double render error, so is this possible? I want to redirect after a delay using a meta refresh. Here''s what I''ve got: app/controllers/application_controller.rb: def redirect_after_delay (url, delay)
2006 Mar 22
2
Edge Rails (1.1.0 RC1) and Typo Trunk
I tried the current Typo trunk with Edge Rails (1.1.0 RC1) and ran into the following problems: 1) /public/../config/environment.rb:107: undefined method `enable_upload_progress'' for ActionController::Base:Class (NoMethodError). I commented this line out and installed the Upload Progress plugin and this problem _appears_ to have gone away. 2) The second problem I
2006 Aug 06
0
Can I strip a file suffix off a URL with routing?
I would like a route that strips of the suffix of a url before determining the action. Eg: http://mydomain.com/my_controller/my_action.pdf Would map to: { :controller => ''my_controller'', :action => ''my_action'' } Is this possible? Thanks, -Jonathan.
2006 Jul 24
9
Mongrel: auto-reload plugins?
When developing applications, Webrick will automatically reload controllers, models, etc. if the source changes. For obvious reasons, it doesn''t do this for plugins, which makes it a pain to develop said plugins. I was hoping Mongrel might have some facility to say "watch this directory too and reload any changes". Obviously, re-init''ing all plugins would be
2011 Jun 16
0
Rails 3.1, SASS, @import, and directories
So, here''s the problem: @import isn''t liking other directories. Example: app/ assets/ stylesheets/ extras/ _mixins.sass _variables.sass photographs/ index.css.sass And the contents of app/assets/stylesheets/photographs/index.css.sass is: @import "../extras/mixins", "../extras/variables" I get the following
2009 Feb 02
2
ActiveRecord::AssociationTypeMismatch (User(#54754560) expected, got User(#54510280))
i keep getting this AssociationTypeMismatch error. i think this could be a bug related to ruby/rails when using mixins. heres a short version of my code: # user.rb require ''friend_invitation'' require ''friendship'' class User < ActiveRecord::Base include FriendInvitationUser, FriendshipUser ... end # friendship.rb ... module FriendshipUser def
2005 Feb 02
1
Error when changing from AR 1.0.1 to 1.6
Hello, I have the following output when changing form Active Record 1.0.1 to ActiveRecord 1.6: [error] C:/dev/ruby/lib/ruby/gems/1.8/gems/actionpack-1.4.0/lib/action_controller/support/dependencies.rb:24:in `depend_on'': uninitialized constant ActiveRecord::Mixins (ScriptError)\r [error] \tfrom
2006 Aug 22
0
ANN: RSpec 0.6.1
Hi all Go grab the latest release of RSpec (gem install rspec). It has 9 bug fixes and some extra features, most notably a working rails_spec_runner, which allows you to run your Rails specs *fast*. Release notes: http://rubyforge.org/frs/shownotes.php?release_id=6590 Cheers, The RSpec team
2007 Nov 01
8
Specifying mixins
Hi folks, Can anyone share some accumulated wisdom about the best way to spec mixins in general, and (Jamis Buck-style) ActiveRecord "concerns" in particular? The standard situation here is that there''s a bunch of functionality, related by concept if not by implementation, that one wants to inherit in many different classes (e.g. ActiveRecord models) without having to
2006 Apr 08
2
Cannot use view helpers in RJS helpers
Any ideas why I would get an error in a RJS helper on view helpers such as number_to_currency. Example: # my_template.rjs page.help_me # my_helper for my_controller def help_me number_to_currency(10) end I have also tired page.number_to_currency but that doesn''t work either. Cheers, Nicholas
2007 Apr 01
2
"-" instead of "_" in routes?
Hi all I''d like to have minus signs "-" instead of underscores "_" in my routes. Is there an easy to do that? my_controller/show_something/123 # <= not cool my-controller/show-something/123 # <= much cooler Thanks a lot Josh -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2007 Aug 13
2
Backtrace tweaker - broken or me?
Using 1.0.8, I just realized that I''ve been scrolling through pages of backtraces when rspec is supposed to clean them up for me. This is a new development machine, so I''m not sure if older versions worked or not. I''m running Ruby 1.8.6, Rails edge, Mac OS X 10.4.10. I''ve verified that the QuietBacktraceTweaker is the one that''s running.
2006 Oct 17
3
Should fixtures be transactional?
I started using the new Model.should_have(1).records expectation in rspec_on_rails, and quickly realized that my fixtures were remaining loaded, even in contexts that didn''t use them. Bug or feature? Jay Levitt
2009 Jan 03
0
understanding rails internal architecture
i am currently digging into the rails 2.2.2 source to get a deeper understanding of some features (in particular model-validation) and a better overall insight. most of rails features are encapsulated in a separate module - as far as can see - and wired together through mixins. this makes sense and following the logic in the single modules is easy. but i am getting stuck while puzzling to see it