Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ioquatix-html_helpers

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ioquatix-html_helpers

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Copyright (c) 2008 Samuel Williams. Development proudly sponsored by Orion Transfer Ltd. http://www.oriontransfer.co.nz/

===== HTML Helpers ====

As the name implies, HTML Helpers is a library of helper methods for producing nice HTML.

It is still very basic, but provides three things:

==== Tabular Form Builder ====

The tabular form builder creates a

for forms. It's fairly easy to use.

Typically, one creates a form partial

  • users/_form.rhtml

<% f.fieldset do %> <%= f.error_messages %> <%= f.text_field :login %> <%= f.text_field :email %>

<%= f.text_field :password %>

<%= f.check_box :verified %>
<%= f.check_box :deleted %>

<%= f.submit %>

<% end %>

  • users/new.rhtml

New User

<% table_form_for :user, :url => {:action => :create} do |f| %> <%= f.render_form %> <% end %>

==== Icon Tag ====

This helper basically is a substitute for image_tag with a very specific purpose: putting icons on the page.

Most people should be familiar with icon sets such as http://www.famfamfam.com/. It is often useful to specify icons in a generic way, especially when there are a lot of them.

Icon tag helps to minimize the amount of typing needed to put icons on the page. It also integrates with engines.

For example:

<%= link_if_authorized icon_tag(:edit), edit_user_path(user) %>

This searches through a number of different locations. In this case, #{controller} means "users" and #{icon} means :edit. For plugins, it searches:

- /public/images/#{controller}/#{icon}
- /public/plugin_assets/:plugin_name/images/#{controller}/#{icon}
- /public/images/default/#{icon}
- /public/plugin_assets/:plugin_name/images/default/#{icon}

Icons must be PNG at this time, but this may change in the future.

==== Inside Layout ====

This helper basically allows you to render one layout inside another. For example:

  • layouts/admin.rhtml

<% inside_layout 'application' do %>

Admin Interface

<%= yield %> <% end %>

===== License =====

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

FAQs

Package last updated on 11 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc