Added support to :float field on model annotations #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was working on a RoR personal project with some
Float
fields on many models.I discovered that
solargraph-rails
worked fine with every other type of field, but onFloat
fields did not.I did a search on the code using The Silver Searcher tool, and found out that the file
lib/solargraph/rails/pin_creator.rb
on it's last method calledtype_translation
it was lacking the'float' => 'Float'
pair on the dictionary. That's why the tool was not working.I've built the gem locally, and tested it with my project and everything went fine. I've also changed the version number from
0.3.0
to0.3.1
to test it locally, and prevent collisions with my previous installation. I don't know if it is worth to change the version name for such a small change, but I let it anyways.Also, I've run the tests with
rake spec
and the 70 tests were green.I'd like to collaborate with this project. I found it very usefull, and I believe that solargraph typechecking is turning Ruby in some strange "strong typed language", kind of something like Typescript. And there is a lot of dragons to slay, lol. I'd be glad to receive any feedback.
BTW, what does "pin_creator" means? For what I've seen in the code, the class adds the
"@return"
so the IDE extension can tell what kind of variable will return the method/variable. How can I know more about Solargraph under the hood? Any recommendations or tips? or it is better to dive on the Issues tab on this project?Best regards,
Karl.