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

Unsupported data type decimal #33

Open
kiterminal opened this issue Sep 19, 2012 · 7 comments
Open

Unsupported data type decimal #33

kiterminal opened this issue Sep 19, 2012 · 7 comments

Comments

@kiterminal
Copy link

I got error message

ActionView::Template::Error (Unsupported data type decimal):
    1: <div class="actions">
    2:   Order:
    3:   <%= select_tag(:wf_order, options_for_select(wf_filter.condition_options, wf_filter.order), {:onChange=>"markDirty()"}) %>
    4:   <%= select_tag(:wf_order_type, options_for_select(wf_filter.order_type_options, wf_filter.order_type), {:onChange=>"markDirty()"}) %>
    5:   Per Page:
    6:   <%= select_tag(:wf_per_page, options_for_select(wf_filter.per_page_options, wf_filter.per_page.to_s), {:onChange=>"markDirty()"}) %>

I used Ruby 1.8.7 and Rails 3.2.8.

users_controller.rb

def index
    @users = User.filter(:params => params)
end

index.haml

= will_filter_tag(@users)
= will_filter_table_tag(@users)

What's wrong in this code? Help me please.

@berk
Copy link
Owner

berk commented Sep 19, 2012

Please open config/will_filter/config.yml and add decimal to the container mapping.
I will add it to the template as well.

Michael

On Sep 19, 2012, at 7:30 AM, Chainarin Thanichaiyawat [email protected] wrote:

I got error message

ActionView::Template::Error (Unsupported data type decimal):
1:


2: Order:
3: <%= select_tag(:wf_order, options_for_select(wf_filter.condition_options, wf_filter.order), {:onChange=>"markDirty()"}) %>
4: <%= select_tag(:wf_order_type, options_for_select(wf_filter.order_type_options, wf_filter.order_type), {:onChange=>"markDirty()"}) %>
5: Per Page:
6: <%= select_tag(:wf_per_page, options_for_select(wf_filter.per_page_options, wf_filter.per_page.to_s), {:onChange=>"markDirty()"}) %>
I used Ruby 1.8.7 and Rails 3.2.8.

users_controller.rb

def index
@users = User.filter(:params => params)
end
index.haml

= will_filter_tag(@users)
= will_filter_table_tag(@users)
What's wrong in this code? Help me please.


Reply to this email directly or view it on GitHub.

@kiterminal
Copy link
Author

Thank you

@bashcoder
Copy link

Same issue with type mediumtext for me. Adding this fixed it:

mediumtext:           [nil, text, text_delimited]

@denispeplin
Copy link

And same issue for type Time.

Fixed it by converting to text as described above.

@frankhinek
Copy link

I looked at the template today and it still doesn't have decimal listed. Can you update the config.yml template?

@irobayna
Copy link

+1

@buoyant
Copy link

buoyant commented Jan 15, 2014

Add in data_types mapping.

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

No branches or pull requests

7 participants