How can i add a space between a Label and a combo box in Ruby code -



How can i add a space between a Label and a combo box in Ruby code -

i new ruby, need add together space between label , combo box in ruby file.

sample code:

def render_search_combo_box(project, selected_value=nil) homecoming unless user.current.logged? s = "<select id='search_options' name='search_options'>" end

i have tried adding 'nbsp;' before 'select' no result came.

thanks in advance.

i think, it`ll improve solve problem using css.

for illustration (in css file):

#search_options {margin-left: '10px'}

however, why not utilize rails form helpers build form? can accomplish same result (in view):

<% if user.current.logged? %> <%= select_tag "search_options" %> <% end %>

ruby ruby-on-rails-3

Comments

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -