lib/i18n_alchemy/proxy.rb
# TODO: cannot assume _id is always a foreign key.
# Find a better way to find that and skip these columns.
cannot assume _id is always a foreign key.
Find a better way to find that and skip these columns.
cannot assume _id is always a foreign key . Find a better way to find that and skip these columns .
def define_localized_methods(column_name)
        class << self; self; end.instance_eval do
          define_method(column_name) do
            @localized_attributes[column_name].read
          end
          define_method("#{column_name}_before_type_cast") do
            @localized_attributes[column_name].read
          end
          define_method("#{column_name}=") do |value|
            @localized_attributes[column_name].write(value)
          end
        end
      end
def define_localized_methods ( column_name ) class << self ; self ; end . instance_eval do define_method ( column_name ) do @localized_attributes [ column_name ] . read end define_method ( "#{column_name}_before_type_cast" ) do @localized_attributes [ column_name ] . read end define_method ( "#{column_name}=" ) do | value | @localized_attributes [ column_name ] . write ( value ) end end end
TODO: cannot assume _id is always a foreign key.
TODO : cannot assume _id is always a foreign key .
# Before type cast must be localized to integrate with action view.
column_name