Open behindcurtain3 opened 9 years ago
Here is the code I'm trying to use:
<%= best_in_place_if user_signed_in?, @movie, :runtime, :as => :input, :display_with => lambda {|v| t('movie.runtime.data', :length => v) }, :nil => t('movie.unknown'), :inner_class => 'form-control' %>
and
<%= best_in_place_if user_signed_in?, @movie, :released, :as => :date, :display_with => :time_tag, :nil => t('movie.unknown'), :inner_class => 'form-control' %>
On both of those examples the nil portion never fires. It seems to be overwritten by the :display_with option. I did this in another portion of my code and it works fine:
<%= best_in_place_if user_signed_in?, @movie, :summary, :as => :textarea, :inner_class => 'form-control', :nil => t('movie.unknown') %>
Am I doing something wrong or could someone help me with what I'm missing here?
Here is the code I'm trying to use:
and
On both of those examples the nil portion never fires. It seems to be overwritten by the :display_with option. I did this in another portion of my code and it works fine:
Am I doing something wrong or could someone help me with what I'm missing here?