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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:09:59+00:00 2026-06-10T00:09:59+00:00

In my application I have a sing_up_page which has a sing_up_form which has a

  • 0

In my application I have a sing_up_page which has a sing_up_form which has a drop_down_list Which shows the role_type.

RoleType is the class in application in which I have stored records

insert into role_type (id,name) values (1,'user');
insert into role_type (id,name) values (1,'admin');
insert into role_type (id,name) values (1,'vender');

manually in database before starting the application. Before moving to the sing_up_page I do

@role_type=RoleType.all

so that drop down can use it to display role_types but I want If their is a procedure to produce these records at the boot time of the application without manually creating records in database as in Groovy on Grails.

  • 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-10T00:10:01+00:00Added an answer on June 10, 2026 at 12:10 am

    If you create a .rb file in app/config/initializers/, it will be executed when the server loads.

    Example:

    app/config/initializers/seed.rb

    %w{user admin vendor}.each do |role|
      RoleType.create(:name => role)
    end
    

    Every time the server loads, these records will be created.

    Question: why are these records not retained in your database? Are you or someone else deleting them?

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

Sidebar

Related Questions

In my console application have an abstract Factory class Listener which contains code for
My Application has 3 activities (MainActivity,SampleActivity,TempActivity) and Application have to start from MainActivity because
I have application which uses Sherlock ActionBar package. The application uses platform-specific behavior for
I have a WPF4 application i have 1 window which editing data : main
My application have some problem on opening 32bit BMP images. some image has alpha
I'm starting work with PHPUnit with Kohana. My application have many controllers which simply
In my CodeIgniter application have a common header and footer view, which I include
I have Rails application (Redmine) and I have created next working code which close
My application have a WebView. The WebView HTML has: <video id=player src=rtsp://somesite/videofile.mp4 >Video content</video>
My new iPhone application have .ipa file size (by Archive) is 2.8 MB, which

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.