There is no validation_context methods in API. But the instance has
them:
validation_context
validation_context=

What are these methods? What do they do? Where to get info about them?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Gintautas Šimkus at Apr 15, 2013 at 9:48 pm
    private/protected methods? What r u trying to accomplish?


    2013/4/16 Wins Lin <lists@ruby-forum.com>
    There is no validation_context methods in API. But the instance has
    them:
    validation_context
    validation_context=

    What are these methods? What do they do? Where to get info about them?

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.


    --
    Pagarbiai,
    Gintautas

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Wins Lin at Apr 15, 2013 at 10:16 pm

    Gintautas S. wrote in post #1105766:
    private/protected methods? What r u trying to accomplish?
    --
    Pagarbiai,
    Gintautas
    I want to validate data from a form - an email string and a
    password string. The Rails do not have special validator classes for the
    common use cases (emails, digits, ip's, etc), (please correct me if I'm
    wrong but I couldn't find any).

    But there are some validators in ActiveModel and I'm trying to
    understand what they offer and whether I can use them.

    I do not use Rails ActiveRecord (--skip-active-record) and yet didn't
    created any models. I'm just testing POST requests, receiving password
    and email in my "create" action method. And want to validate them. Is it
    possible with the validators Rails offer?

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Justin T. at Apr 16, 2013 at 4:47 am
    You could use this gem to validate email addresses:
    https://github.com/alexdunae/validates_email_format_of
    You should be able to use it without needing AR, as well.
    On Monday, April 15, 2013 6:16:13 PM UTC-4, Ruby-Forum.com User wrote:

    Gintautas S. wrote in post #1105766:
    private/protected methods? What r u trying to accomplish?
    --
    Pagarbiai,
    Gintautas
    I want to validate data from a form - an email string and a
    password string. The Rails do not have special validator classes for the
    common use cases (emails, digits, ip's, etc), (please correct me if I'm
    wrong but I couldn't find any).

    But there are some validators in ActiveModel and I'm trying to
    understand what they offer and whether I can use them.

    I do not use Rails ActiveRecord (--skip-active-record) and yet didn't
    created any models. I'm just testing POST requests, receiving password
    and email in my "create" action method. And want to validate them. Is it
    possible with the validators Rails offer?

    --
    Posted via http://www.ruby-forum.com/.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/DTyaLrw3pB0J.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedApr 15, '13 at 9:38p
activeApr 16, '13 at 4:47a
posts4
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase