Search Results

Search found 60 results on 3 pages for 'dorelal'.

Page 3/3 | < Previous Page | 1 2 3 

  • how to search for a term only in non test files

    - by dorelal
    I use ack and I like it. However from time to time I need to search for something in my code base and I want to ignore all the files residing in test directory. Basically all the files which have test in their absolute path should be not included in the search. How do I achieve that? I am willing to have a custom bash script. Something like ack_no_test "application" - search for "application" in all files but ignore files residing in test directory

    Read the article

  • How to create an after_save callback on runtime

    - by dorelal
    I am using ruby on rails 2.3.5 . I have user instance. On run time depending on certain conditions I want to add an after_save callback just for this instance. The other issue is that this after_save should take a block or a proc as parameter. What I want is something like this. This is psuedo code. user = User.first proc = Proc.new do puts 'this is foo' end user.after_save proc

    Read the article

  • Why remote git server should have --bare

    - by dorelal
    I am reading these two articles. However I still do not get --bare option. If the server has no working directory and if a new member of the team clones the project then that person will not get any content. Any further clarification will help on why --bare is needed.

    Read the article

  • closure not working

    - by dorelal
    var Dog = function() { var _instance = 'hello world'; return function() { console.log(this._instance); } } (); //note that it is self invoking function var l = new Dog(); //#> undefined In the above case I was expecting output of 'hello world'. Why this._instance is not accessing the the varible which should be accessible by virtue of closure. I tested this in FF and am getting undefined.

    Read the article

  • creating a new dirctory in vim

    - by dorelal
    I have following setting which lets me easily create a new file from the currently open file map <Leader>e :tabe <C-R>=expand("%:p:h") . "/" <CR> Is there something similar which would let me create a directory from the current directory. Otherwise what are the other tricks you are using to create a directory and then create a file there.

    Read the article

  • nested has_many

    - by dorelal
    I am using Rails 2.3.5. Class User < ActiveRecord::Base has_many :phones end class Phone < ActiveRecord::Base has_many :frequency_bands end I want to get all the frequency_bands for a user. I know I can write a method def freq_bands for User but I would like to know if it is possible to have has_many freq_bands for a User. In this way I can chain the call. What I would like to have is class User < ActiveRecor::Base has_many :frequence_bands, :through => phones end I think it is possible to have nested has_many using this plugin http://github.com/ianwhite/nested_has_many_through However if possible I would like to avoid using another plugin and rely solely on rails.

    Read the article

  • Module.new with class_eval

    - by dorelal
    This is a large commit. But I want you to concentrate on this change block. http://github.com/rails/rails/commit/d916c62cfc7c59ab6411407a05b946d3dd7535e9#L2L1304 Even without understanding the full context of the code I am not able to think of a scenario where I would use include Modue.new { class_eval <<-RUBY def foo puts 'foo' end RUBY } Then end result is that in the root context (self just before include Moduel.new) a method call foo has been added. If I take out the Module.new code and if I only leave class_eval in that case also I will have a method called foo in self. What am I missing.

    Read the article

< Previous Page | 1 2 3