Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8614133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:03:05+00:00 2026-06-12T05:03:05+00:00

I have a model Client which contains an array field. In the client.rb model

  • 0

I have a model Client which contains an array field.
In the client.rb model I tried something like this :

field :menu_top
...
validates_length_of :menu_top, :maximum => 4

It seems to work but if I put more than 4 item in this array in the form, it sends me this =>

undefined method `admin_client_path' for #<#<Class:0x007fbc80a63cb0>:0x007fbc80b566b8>
Extracted source (around line #1):

1: <%= form_for [:admin, @client], :url => @post_form_path, :html => { :multipart => true } do |f| %>
2: <% if @client.errors.any? %>
3: <div class="alert-message block-message error">
4: <h2 class="dark-red"><%= pluralize(@client.errors.count, t(:error)) %> <%= t(:client_error) %>:</h2>

I don’t understand why it doesn’t render a form error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:03:06+00:00Added an answer on June 12, 2026 at 5:03 am

    You have your menu entries stored in the array and you are rendering the menu entries dynamically out of this array, right?

    Now you have specified an menu entry in your array which isn’t defined as such in the routes.rb. Try to run rake routes and check if admin_client_path is really there.

    The error has nothing to do with your validation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form which contains rows like this one. I need to be
I have model Foo which has field bar. The bar field should be unique,
I have a Model which contains an Address and Person twice, once for the
I have a grid with a column which contains a nullable data Html.Telerik().Grid(Model) .Columns(columns
I have a Client model with a OneToOne relationship to User, to extend the
I have HABTM models Client and Book . Client model has a bookshelf_color attribute
I have a model with many fields (nearly 40). The client wants the fields
In my GWT app I have the following model class: import com.google.gwt.user.client.rpc.IsSerializable; public class
In a client application I have a DBIx::Class model 'Todo' that can be linked
I am trying to have my client side validation (model binding) to support different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.