ruby-hyperloop / hyper-component

The project has moved to Hyperstack!!
https://hyperstack.org/
MIT License
1 stars 3 forks source link

support setting param type with a string. #1

Open zw963 opened 7 years ago

zw963 commented 7 years ago

Current worked version is:

 param :sku, type: String

But, I expect version is:

  param :sku, type:  'String'

In rails 5, use a constant in method argument result in eager laad, will broken somethings in dev. So, rails 5 with deperagate WARN for following example code:

has_many :order_notifications, class_name: Notification::Order   # bad
has_many :order_notifications, class_name: 'Notification::Order'   # good
catmando commented 6 years ago

type here is more similar to "class" in AR... in fact I think there is an issue to change it class. We could have type_name or class_name if needed...