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

Allow js views #139

Open
wants to merge 9 commits into
base: 1.2
Choose a base branch
from
Open

Allow js views #139

wants to merge 9 commits into from

Conversation

javierg
Copy link
Member

@javierg javierg commented Feb 12, 2018

Allow to create JS only views

@@ -4,7 +4,7 @@ class Property
attr_accessor :name
attr_reader :class_name, :default

CANT_CLONE = [NilClass, TrueClass, FalseClass, Fixnum].freeze
CANT_CLONE = [NilClass, TrueClass, FalseClass, Integer].freeze

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that you should still use fixnum

> 1.frozen?
=> true
[2] pry(main)> 1.5.frozen?
=> true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> 1.5.clone
TypeError: can't clone Float

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well it actually looks like Float is not a fixnum, so that should be added too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixnum is depracated in rails > 5.0 we need to remove it, and yeah we need to add float
I dont thing integer is needed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this change in rails 5?

> 1.clone
TypeError: can't clone Fixnum

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it change > 1.clone works on rails 5 with no error... I dont think this particular change affect us that much we can handle it and make it backwards compatible

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does affect us a lot. any default property that is an integer or a float would be affected

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code is important for default properties to work

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you don't think we can handle it in a way is compatible in both Tails 4 and 5?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there is a change to the inheritance models of the underlying rails/ruby code, I dont think so. Feel free to prove me wrong. I feel like this is a change that will not be compatable with rails 4 if Fixnum does not exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants