Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.6.6---Rails4.2 Nothing to annotate #235

Closed
DevinHe opened this issue Mar 10, 2015 · 4 comments
Closed

v2.6.6---Rails4.2 Nothing to annotate #235

DevinHe opened this issue Mar 10, 2015 · 4 comments
Labels

Comments

@DevinHe
Copy link

DevinHe commented Mar 10, 2015

When i used annotate_models gem in my Rails4.2 project(Ruby-v2.1.2), it works wrong.Then i found some differences between version 2.6.5(tested in Rails4.1.4 and Ruby-v1.9.3 project) and version 2.6.6.

#../annotate.rb
  def self.setup_options(options = {})
   #...
    puts "model_dir-------------------------#{options[:model_dir]}"
    if(!options[:model_dir])
      options[:model_dir] = ['app/models']
    end
    puts "model_dir-------------------------#{options[:model_dir]}"
    return options
  end

Print Results:

v2.6.5

model_dir-------------------------
model_dir-------------------------app/models

v2.6.6

model_dir-------------------------[]
model_dir-------------------------[]

When i modified the code,it works well again:

  # v2.6.6
  def self.setup_options(options = {})
   #...
    if(options[:model_dir].empty?)
      options[:model_dir] = ['app/models']
    end
    return options
  end

Print:
model_dir-------------------------[]
model_dir-------------------------["app/models"]
I am not sure about this issue,it's a bug or not.

@ctran
Copy link
Owner

ctran commented Mar 10, 2015

This is reported in #234. I pushed the fix to 2.6.7.

@ctran ctran closed this as completed Mar 10, 2015
@DevinHe
Copy link
Author

DevinHe commented Mar 11, 2015

@ctran I find you merged the fix to develop branch.The v2.6.7 is still wrong.

    if(!options[:model_dir])
      options[:model_dir] = ['app/models']
    end

@dlynam
Copy link

dlynam commented Mar 11, 2015

+1 I'm still seeing this issue as well.

@ctran
Copy link
Owner

ctran commented Mar 12, 2015

Arrh, that's what I get for lack of sleep. I'll push another version.

@ctran ctran added the released label Dec 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants