espresso 0.0.16 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ begin
7
7
  gem.name = "espresso"
8
8
  gem.summary = %Q{Rails extender to simplify rails development}
9
9
  gem.description = %Q{Useful templates for controller and model functions}
10
- gem.email = "rotuka@rotuka.com"
10
+ gem.email = "rotuka@tokak.ru"
11
11
  gem.homepage = "http://github.com/krasivotokak/espresso"
12
12
  gem.authors = ["Alexander Semyonov"]
13
13
  gem.add_development_dependency "thoughtbot-shoulda"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.16
1
+ 0.1.0
data/espresso.gemspec CHANGED
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{espresso}
8
- s.version = "0.0.16"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexander Semyonov"]
12
- s.date = %q{2009-09-01}
12
+ s.date = %q{2009-09-16}
13
13
  s.description = %q{Useful templates for controller and model functions}
14
- s.email = %q{rotuka@rotuka.com}
14
+ s.email = %q{rotuka@tokak.ru}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.rdoc"
@@ -3,12 +3,22 @@ module Espresso
3
3
  include WillPaginate::ViewHelpers
4
4
 
5
5
  def simple_search
6
- form_tag(url_for(:action => :index), :method => :get, :class => 'b_search b_search-simple') do
7
- inform = returning '' do |result|
8
- result << text_field_tag(:q, params[:q])
9
- result << submit_tag(t('krasivotokak.espresso.find', :default => 'Find!'), :class => 'submit')
10
- end
11
- concat inform
6
+ returning '' do |form|
7
+ form << form_tag(url_for(:action => :index), :method => :get)
8
+ form << content_tag(:table, :class => 'b_search') do
9
+ content_tag(:tr) do
10
+ returning '' do |result|
11
+ result << content_tag(:td,
12
+ content_tag(:div, text_field_tag(:q, params[:q], :type => 'search'), :class => 'b_input'),
13
+ :class => 'input')
14
+ result << content_tag(:td,
15
+ submit_tag(t('krasivotokak.espresso.find', :default => 'Find!'), :class => 'submit'),
16
+ :class => 'button')
17
+ end
18
+ end
19
+ end
20
+ form << yield if block_given?
21
+ form << '</form>'
12
22
  end
13
23
  end
14
24
 
@@ -17,9 +17,9 @@ module Espresso
17
17
  # @return [Array] searchlogic object and collection of results
18
18
  #
19
19
  # @todo Add an options to paginating
20
- def paginate_found(page = nil, query = nil, simple_query = nil)
20
+ def paginate_found(page = nil, query = {}, simple_query = nil)
21
21
  query ||= {}
22
- query.merge!(parse_simple_query(simple_query)) if simple_query.present?
22
+ query.merge!(self.parse_simple_query(simple_query)) if simple_query
23
23
  @search = search(query)
24
24
  @results = @search.paginate(:page => page)
25
25
  [@search, @results]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: espresso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Semyonov
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-01 00:00:00 +04:00
12
+ date: 2009-09-16 00:00:00 +04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -53,7 +53,7 @@ dependencies:
53
53
  version: 2.3.11
54
54
  version:
55
55
  description: Useful templates for controller and model functions
56
- email: rotuka@rotuka.com
56
+ email: rotuka@tokak.ru
57
57
  executables: []
58
58
 
59
59
  extensions: []