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

  • Home
  • SEARCH
  • 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 9216761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:29:08+00:00 2026-06-18T02:29:08+00:00

EDIT: Okay, so using cells I have got it running, indeed the rb file

  • 0

EDIT:

Okay, so using cells I have got it running, indeed the rb file created by the cells scripted needed:

helper ApplicationHelper

this got past the error in the comments below, but now inside my application helper, i have a method:

  def hr_user_past
    @current_year = current_year
    @hr_user_past ||= Employee.where("username=? and year < ?", session[:hr_user].username, @current_year).order("Year DESC") if session[:hr_user]
    @past_times = @current_year - 2011
    @blart = 'test'
  end

And alas, this now cannot find current_year which is a def method in my application_controller.rb, so I think my flow is all messed up and not sure what I need to have where for a good solid “include”.

Def of the current_year from application controller

 class ApplicationController < Actioncontroller::Base

            helper_method :current_year

  ... 
  ...
      def   current_year

         OpenPeriod.maximum :year
      end
 end

I also am worried all this work still wont solve the issue I am having with the twitter bootstrap modal dialog being called from a layout and not fadeing in all the way with data (minute i put the same code in a view, it works right)… but one issue at a time i guess…

END EDIT

Trying to have an objective question here though. Some background:

I have a navigation layout that has this nice login, home button and a few others on it. It works fine, lately the customer wanted some more functionality added to this namely a smart button that drops down dynamically with data filled out (stuff from years past from old forms we use).

So the app used a twitter bootstrap modal elsewhere. I just posted this question here:

twitter bootstrap modal does not work in rails3 layout?

Where I am having an issue with this modal working correctly from the layout. Then I got to thinking, this modal that drops down has some good amount of data usually from a specific controller, but they want to see this data at any moment. Is the layout way of doing this not the way, should I build an application helper .rb code to fill out a partial and include that partial on every page in the app? ( seeems like it should fix my modal displaying oddly, like constantly faded issue). I think my green-ness to ruby on rails is at fault here. I know its awesome and there is a lot to it and this is the first project I have done in it. So I am not sure what the correct solution is here, and I think its a vocabulary issue. Like what am i looking for?

Form helpers
Templates
Partials
etc etc… what is the best fit here? I realize in coding there is a lot of ways to skin a cat but I am not sure where to ask. Rereading this is getting subjective. Basically

I have a home controller that sets up things on a home page, turns out this data needs to be seen by the user at any given moment from any page in the app. Tried to move it to our navigation layout, its not going well. Is this the right approach or is there a better one?

  • 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-18T02:29:10+00:00Added an answer on June 18, 2026 at 2:29 am

    One approach would be to use Cells. Essentially, a cell is a miniature controller that takes care of fetching data and rendering a view. It’s not quite a full-blown view, it’s a component which, similar to a partial, may be included into other views of your application – or even the layout, which is useful when you have something that appears on every page.

    A classic example (which they implement on their homepage) is that of a shopping cart – it appears throughout your app but it needs to have some data set; turning it into a cell extracts both the querying and the rendering into a nicely-separated MVC unit.

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

Sidebar

Related Questions

Okay, this is a bit messy: I'm using Netbeans, and I have a main
Okay I edit my question, try to explain it more clearly: I have a
using CodeIgniter normally one has to specify the controllers in the config/routes.php file. This
I have a UITableView with custom cells in it. This custom cell looks like
I have created a three page web page and I'm using an external css
I have this C++ project which compiles using a Makefile, and sometimes when (
I have this strange issue with my web app. You see, I'm using jQuery
EDIT 2 Okay, based on the advice on the answers below I eliminated my
OKay I don't use actionscript and trying to help my friend edit a flash
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question

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.