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 9010995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:36:40+00:00 2026-06-16T02:36:40+00:00

How to override Active Scaffold form fields for date or time? (datepicker and calendar_date_select

  • 0
  1. How to override Active Scaffold form fields for date or time?
    (datepicker and calendar_date_select didn’t work for me, probably
    because I’m using the activescaffold gem)
  2. How to override Active Scaffold form to select from a list of resources in the
    database?

Thanks.

  • 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-16T02:36:41+00:00Added an answer on June 16, 2026 at 2:36 am

    I was struggling this question until I figured it out. Here’s an example:

    class Player < ActiveRecord::Base
      belongs_to :game
      attr_accessible :name
    end
    
    class Game < ActiveRecord::Base
      has_many :players 
      attr_accessible :thedate, :thetime, :winnername
    end
    
    class GamesController < ApplicationController
      active_scaffold :game do |conf|
        # do nothing in this example
      end
    end
    
    module GamesHelper
    
      # date select
      def game_thedate_form_column (record, options)
        date_select :record, :thedate, options
      end
    
      # time select
      def game_thetime_form_column (record, options)
        time_select :record, :thetime, options
      end
    
      # select from database resources
      def game_winnername_form_column (record, options)
        select_tag :winnername, options_for_select(get_players_names_arr(record)), options
      end
    
      def get_players_names_arr(game)
        names = []
        game.players.each do |player|
          names << player.name
        end
        names 
      end
    
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Rails 3.1.0, with Active Scaffold (from the git repo). My controllers have code
I override ProcessCmdKey() in my MDI parent form class and have some keyboard shortcut
I'm trying to use a authenticate with an Active directory using Spring Security 3.1.
I wanna override html code when working with active_admin gem in Rails; because the
I want to override the Active Record class (some functions of it at least).
I am trying to override an active resource method like explained in this question
I'm working in Entity Framework 5. We're using Microsoft Active Directory for user authentication.
I am using ViewScripts to decorate my form elements. With radio elements, the separator
public class SessionManager extends BroadcastReceiver{ Date timeOff; Date timeOn; @Override public void onReceive(Context context,
How does one set a default value for a text input using ActiveScaffold 1.2RC1?

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.