[Rails] Re: Lookingfor ROR Developer in Rosemont, IL

2015-02-09 Thread Manikandan Suriyamoorthi
Hi,

we are interested on your job. please share your details to
manikan...@optisolbusiness.com so that i can able to send you our ROR
resource profile.

Thanks,
Manikandan

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/0ba01a15cca3ad3e3693a183a5c11236%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Lookingfor ROR Developer in Rosemont, IL

2015-02-09 Thread Aparna Sikri

Please find the job description of Ruby on Rails Developer. If you are 
interested please email me your updated resume in word doc and I will 
contact you ASAP.
Description:
 Conceptualize and build efficient, well-organized web or enterprise 
applications Work on all levels of the technical stack, from front-end 
styling/HTML to back-end coding in Ruby on rails. Be 100% hand-on Ruby on 
Rails developer. Understanding of code manipulation and optimization issues 
in Rails applications Ability to write unit test cases, code reviews, 
refactor the code and implement new features using MVC design patterns 
Skill/qualifications BS or MS in Computer Science or equivalent experience 
Prior experience designing, implementing, and maintaining Ruby on Rails 
based components in a enterprise level and/or consumer facing web 
applications. 
 Experience in XHTML (HTML 5 a plus), Javascript, CSS and general Web 2.0 
techniques required Rapidly troubleshoot to solve problems and bugs 
Experience with object oriented analysis and design is must. Experience 
working with Remote (onsite / offshore) developers is required. 
 Familarity on relational databases, preferably PostgreSQL Understanding of 
web services technologies such as SOAP, HTTP, WSDL, XSD, and REST.
  A proven ability to learn and adapt to new, complex development 
environments. 
Experience using RSpec/Cucumber. Any certification on RoR will be a plus 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/a930a281-fd8c-41ed-88af-b8dc7dd04030%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] OpenStruct Rails

2015-02-09 Thread Matt B.
Hey guys,

I am new to Rails, and have just completed my first app, a simple
Blog... However I am looking to add more to it, I had a parser created
for me that will scrape sports lines off a webpage. The problem is it is
stored in an OpenStruct and I am not sure how to store it. He file runs
just fine and I even placed it in my controller with the Puts
Results[]  is a specific game code and it works perfect.

However I want to store these values in a Database and then every time
the webpage is refreshed it checks the lines and if they changed
overwrites it.

The name of my OpenStruct object is results and I can do a for each pair
puts k v or I can do a specific gamecode which is unique. And cal like
about results[x] .

I believe the script we be its own controller but how and where do I
store the values ??? Please help.  Below is the Gists with the parse
code if that helps.

https://gist.github.com/weaksauce/3b9cd8497c644fa33ddb


Matt

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/64e3af38190c696a27c35c7f8b576ec9%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Rails views "new,edit,show" with same layout?

2015-02-09 Thread KlausG
So we have such wonderfull gems like SimpleForm and Formtastic which help 
us to build our "new" and "edit" view with great support for Bootstrap and 
Foundation.
But what about the "show" view? Is it still hand crafted or is there any 
way to generate a "view only form" with an "Edit" button instead of the 
"Save/Cancel" buttons?

I couldn't find any options in SimpleForm or Formtastic for making the form 
read_only ( or rendering an simple string instead a form input field )

Or are there any other gems out there helping us to show our data in a 
simple CRUD application with support for Bootstrap ?

Thx Klaus


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/c5bb8420-1218-4cbf-959c-6be5c35842dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] ajax will_paginate

2015-02-09 Thread tamouse pontiki
State your problem more clearly, as I don't understand. Better, post the
code you have and what you're actually expecting.

On Mon, Feb 9, 2015 at 11:14 AM, Melb01  wrote:

> Thx for the answer
> but my problem is when I have a query, I am unable to go to the second page
> I get @posts as nil object, it is like paginating with ajax do not submit
> the query when changing the page
>
> rgds,
>
> On Monday, February 9, 2015 at 5:25:13 PM UTC+1, tamouse wrote:
>>
>> ... except with the right model name ...
>>
>> On Mon, Feb 9, 2015 at 10:24 AM, tamouse pontiki 
>> wrote:
>>
>>> Maybe what you want is something more like:
>>>
>>> if params[:q]
>>>   @posts = Posts.find_with_q.paginate...
>>> else
>>>   @posts = Posts.all.paginate...
>>> end
>>>
>>> respond_to do |format|
>>>   ...
>>> end
>>>
>>>
>>>
>>>
>>> So your rendering isn't gated by whether there is a 'q' parameter; it
>>> only determines what gets set into @posts.
>>>
>>> On Mon, Feb 9, 2015 at 5:13 AM, Melb01  wrote:
>>>
 Hi,
 I have an index page with searchbox and with pagination, it worked well
 when I tried to make pagination with javascript, itworked for the first
 page but not the second
 I think the problem is to pass the value of the search box to the
 script of pagination

 here is my code:
 
 
 index.hmtl.erb

 <%= text_field_tag 'q', params['q']  %>
 
 <%= render  'layouts/posts' %>
 
 <% if !@posts.nil? %>
   <%= link_to 'Load More Posts', post_path(:page =>
 @posts.next_page), :class => 'load-more-posts', :remote => true if
 @posts.next_page %>
  <% end %>
 -
 _posts.html.erb
 <% if !@posts.nil? && @posts.size > 0  %>
 <% @posts.each_with_index do |post| %>
 <%= post.title %>
 <%= post.body %>
 <% end %>
  <% end %>
 -


 index.js.erb
 $("#posts").append("<%= escape_javascript(render partial:
 "layouts/posts", :locals => { :posts => @posts }) %>");
 
 ---
 post_controller.rb

 *if !params[:q].nil?   *

   @posts = Post.find_with_q.paginate(:per_page => 10, :page =>
 params[:page])

   respond_to do |format|
 format.html # index.html.erb
 format.json { render json: @posts }
 format.js
   end
 end

 
 


 The problem with this code is thatI can't go to the next page beause
 the params q is null with ajax call
 when I delete the condition it works well
 thank you fo the help

 rgds,



  --
 You received this message because you are subscribed to the Google
 Groups "Ruby on Rails: Talk" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to rubyonrails-ta...@googlegroups.com.
 To post to this group, send email to rubyonra...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/rubyonrails-talk/b53cd303-5228-4885-814b-
 44eaade8c4c6%40googlegroups.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/f336240a-0d3c-4cb0-a3ba-c9b06c496315%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t8V1XPb3BMT_z%3DefuekTJjnw6Y6%3Dn1sa9R5TwzD%3DeNiLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] [Newbie] Filtering Index page

2015-02-09 Thread tamouse pontiki
Hi, Jason, welcome!

As you're building out your skills, I would refrain from looking for a gem
for this sort of functionality, as it's a good thing to learn in general
how to do.

You can do this pretty easily if you only want to allow one position at a
time:

<%= link_to "Staff", people_path(:filter_by => :staff), {:method => :get},
{:class => "button"} %>

for example, with one of these corresponding to each of the positions.
You'll need to create a CSS class for .button to make the link look like a
button.

On your PeopleController#index method, you'll need to check for a filter_by
parameter:

def index
  if params[:filter_by]
@people = Person.where(:position => params[:filter_by])
  else
@people = Person.all
  end

  # ... and whatever else you need to do to prepare for the view...
end

If you want to allow the user to select multiple of these, you'll need a
form with checkboxes or a multi-select.

I hope that's enough of a start.


On Mon, Feb 9, 2015 at 2:18 PM, Jason O  wrote:

> Hello all and thank you for your time and help.
>
> I am working on my first big project and one of the requests that I have
> is to host a directory list people, with the option to click from an array
> of buttons with the different position titles. Button examples being:
> Staff, Faculty, Grad Student, etc.  I have the index listing the full
> directory currently, but I was hoping someone would be willing to point in
> a direction to look for examples of how to set this up, or a gem that might
> be beneficial. I am researching on my own, but I do not feel I am finding
> quite what I am seeking.
>
> Thanks again for any help!
>
> Jason
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/ade15b3b-b4fd-4224-9da1-6d0ee44bd0eb%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t-Aj7AMwpCb_Tcq0PzRReDe3We-2EdZm7MomASP8SXOGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] [Newbie] Filtering Index page

2015-02-09 Thread Jason O
Hello all and thank you for your time and help.

I am working on my first big project and one of the requests that I have is 
to host a directory list people, with the option to click from an array of 
buttons with the different position titles. Button examples being: Staff, 
Faculty, Grad Student, etc.  I have the index listing the full directory 
currently, but I was hoping someone would be willing to point in a 
direction to look for examples of how to set this up, or a gem that might 
be beneficial. I am researching on my own, but I do not feel I am finding 
quite what I am seeking.

Thanks again for any help!

Jason

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/ade15b3b-b4fd-4224-9da1-6d0ee44bd0eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] ajax will_paginate

2015-02-09 Thread Melb01
Thx for the answer
but my problem is when I have a query, I am unable to go to the second page
I get @posts as nil object, it is like paginating with ajax do not submit 
the query when changing the page

rgds,

On Monday, February 9, 2015 at 5:25:13 PM UTC+1, tamouse wrote:
>
> ... except with the right model name ...
>
> On Mon, Feb 9, 2015 at 10:24 AM, tamouse pontiki  > wrote:
>
>> Maybe what you want is something more like:
>>
>> if params[:q]
>>   @posts = Posts.find_with_q.paginate...
>> else
>>   @posts = Posts.all.paginate...
>> end
>>
>> respond_to do |format|
>>   ...
>> end
>>
>>
>>
>>
>> So your rendering isn't gated by whether there is a 'q' parameter; it 
>> only determines what gets set into @posts.
>>
>> On Mon, Feb 9, 2015 at 5:13 AM, Melb01 > 
>> wrote:
>>
>>> Hi,
>>> I have an index page with searchbox and with pagination, it worked well 
>>> when I tried to make pagination with javascript, itworked for the first 
>>> page but not the second
>>> I think the problem is to pass the value of the search box to the script 
>>> of pagination
>>>
>>> here is my code:
>>>
>>> 
>>> index.hmtl.erb
>>>
>>> <%= text_field_tag 'q', params['q']  %>
>>>
>>> <%= render  'layouts/posts' %>
>>> 
>>> <% if !@posts.nil? %>
>>>   <%= link_to 'Load More Posts', post_path(:page => 
>>> @posts.next_page), :class => 'load-more-posts', :remote => true if 
>>> @posts.next_page %>
>>>  <% end %>
>>> -
>>> _posts.html.erb
>>> <% if !@posts.nil? && @posts.size > 0  %>
>>> <% @posts.each_with_index do |post| %>
>>> <%= post.title %>
>>> <%= post.body %>
>>> <% end %>
>>>  <% end %>
>>> -
>>>
>>>
>>> index.js.erb
>>> $("#posts").append("<%= escape_javascript(render partial: 
>>> "layouts/posts", :locals => { :posts => @posts }) %>");
>>>
>>> ---
>>> post_controller.rb
>>>
>>> *if !params[:q].nil?   *
>>>   
>>>   @posts = Post.find_with_q.paginate(:per_page => 10, :page =>  
>>> params[:page])
>>>   
>>>   respond_to do |format|
>>> format.html # index.html.erb
>>> format.json { render json: @posts }
>>> format.js
>>>   end
>>> end
>>>
>>>
>>> 
>>>
>>>
>>> The problem with this code is thatI can't go to the next page beause the 
>>> params q is null with ajax call
>>> when I delete the condition it works well
>>> thank you fo the help
>>>
>>> rgds,
>>>
>>>
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Ruby on Rails: Talk" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to rubyonrails-ta...@googlegroups.com .
>>> To post to this group, send email to rubyonra...@googlegroups.com 
>>> .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/rubyonrails-talk/b53cd303-5228-4885-814b-44eaade8c4c6%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/f336240a-0d3c-4cb0-a3ba-c9b06c496315%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] List of cities in a state

2015-02-09 Thread tamouse pontiki
The big scary comment from the carmen repo owner makes me a bit leery of
using carmen, though with 200+ forks, it looks like it won't be going away
anytime soon, either.

I've used MaxMind's database with other languages (perl) and I know it's
good, too. I'm happier letting someone else manage the collection and
dissemination of geographic data that I can update, than needing to update
a gem for data updates.

I think the biggest wins, by far, are the cities and the update mechanism.

On Sun, Feb 8, 2015 at 7:22 PM, Daniel Loureiro 
wrote:

>
> Em domingo, 8 de fevereiro de 2015 22:27:38 UTC-2, Walter Lee Davis wrote:
>>
>> Have you seen this one? https://github.com/proletarian/carmen-rails I've
>> used it a couple of times, but I will give yours a try as well.
>>
>
> Ouch, that awkward moment that you realize that someone already done what
> you just made - this would save me some time :P
>
> I think the carmen interface is better than mine, but in my defense,
> carmen doesn't provide a list of cities nor have a update mechanism. In my
> country new cities are created weekly, so its necessary to maintain the
> base updated. But its good to know this gem, and I will be glad if you know
> if there's a gem that provides a list of cities too.
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/6dd860f3-a9d8-4c65-979a-349397963366%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t_EJ31tm-cw%2BB5cpqXw1dF8s3y%2B7BRVyGWF9EXDsVDczw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] ajax will_paginate

2015-02-09 Thread tamouse pontiki
... except with the right model name ...

On Mon, Feb 9, 2015 at 10:24 AM, tamouse pontiki 
wrote:

> Maybe what you want is something more like:
>
> if params[:q]
>   @posts = Posts.find_with_q.paginate...
> else
>   @posts = Posts.all.paginate...
> end
>
> respond_to do |format|
>   ...
> end
>
>
>
>
> So your rendering isn't gated by whether there is a 'q' parameter; it only
> determines what gets set into @posts.
>
> On Mon, Feb 9, 2015 at 5:13 AM, Melb01  wrote:
>
>> Hi,
>> I have an index page with searchbox and with pagination, it worked well
>> when I tried to make pagination with javascript, itworked for the first
>> page but not the second
>> I think the problem is to pass the value of the search box to the script
>> of pagination
>>
>> here is my code:
>>
>> 
>> index.hmtl.erb
>>
>> <%= text_field_tag 'q', params['q']  %>
>> 
>> <%= render  'layouts/posts' %>
>> 
>> <% if !@posts.nil? %>
>>   <%= link_to 'Load More Posts', post_path(:page =>
>> @posts.next_page), :class => 'load-more-posts', :remote => true if
>> @posts.next_page %>
>>  <% end %>
>> -
>> _posts.html.erb
>> <% if !@posts.nil? && @posts.size > 0  %>
>> <% @posts.each_with_index do |post| %>
>> <%= post.title %>
>> <%= post.body %>
>> <% end %>
>>  <% end %>
>> -
>>
>>
>> index.js.erb
>> $("#posts").append("<%= escape_javascript(render partial:
>> "layouts/posts", :locals => { :posts => @posts }) %>");
>>
>> ---
>> post_controller.rb
>>
>> *if !params[:q].nil?   *
>>
>>   @posts = Post.find_with_q.paginate(:per_page => 10, :page =>
>> params[:page])
>>
>>   respond_to do |format|
>> format.html # index.html.erb
>> format.json { render json: @posts }
>> format.js
>>   end
>> end
>>
>>
>> 
>>
>>
>> The problem with this code is thatI can't go to the next page beause the
>> params q is null with ajax call
>> when I delete the condition it works well
>> thank you fo the help
>>
>> rgds,
>>
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to rubyonrails-talk+unsubscr...@googlegroups.com.
>> To post to this group, send email to rubyonrails-talk@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/rubyonrails-talk/b53cd303-5228-4885-814b-44eaade8c4c6%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t-Zx7eOvaBaUHJqc3C8dTXy%3D7ArwPZ_5s3O5Kg_kMPUXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] ajax will_paginate

2015-02-09 Thread tamouse pontiki
Maybe what you want is something more like:

if params[:q]
  @posts = Posts.find_with_q.paginate...
else
  @posts = Posts.all.paginate...
end

respond_to do |format|
  ...
end




So your rendering isn't gated by whether there is a 'q' parameter; it only
determines what gets set into @posts.

On Mon, Feb 9, 2015 at 5:13 AM, Melb01  wrote:

> Hi,
> I have an index page with searchbox and with pagination, it worked well
> when I tried to make pagination with javascript, itworked for the first
> page but not the second
> I think the problem is to pass the value of the search box to the script
> of pagination
>
> here is my code:
>
> 
> index.hmtl.erb
>
> <%= text_field_tag 'q', params['q']  %>
> 
> <%= render  'layouts/posts' %>
> 
> <% if !@posts.nil? %>
>   <%= link_to 'Load More Posts', post_path(:page => @posts.next_page),
> :class => 'load-more-posts', :remote => true if @posts.next_page %>
>  <% end %>
> -
> _posts.html.erb
> <% if !@posts.nil? && @posts.size > 0  %>
> <% @posts.each_with_index do |post| %>
> <%= post.title %>
> <%= post.body %>
> <% end %>
>  <% end %>
> -
>
>
> index.js.erb
> $("#posts").append("<%= escape_javascript(render partial: "layouts/posts",
> :locals => { :posts => @posts }) %>");
> ---
> post_controller.rb
>
> *if !params[:q].nil?   *
>
>   @posts = Post.find_with_q.paginate(:per_page => 10, :page =>
> params[:page])
>
>   respond_to do |format|
> format.html # index.html.erb
> format.json { render json: @posts }
> format.js
>   end
> end
>
>
> 
>
>
> The problem with this code is thatI can't go to the next page beause the
> params q is null with ajax call
> when I delete the condition it works well
> thank you fo the help
>
> rgds,
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/b53cd303-5228-4885-814b-44eaade8c4c6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t8zbBpAPeJK%2BUZaQUH_KstQH0s07k80AkLpKdPv1oVy5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Don't work JavaScript pipeline. Need help. =(

2015-02-09 Thread tamouse pontiki
If you delete the javascript_include_tag "application" from your layout, it
won't load the pipelined javascripts.

According to the bootstrap-sass README, you need to put the following:

Require Bootstrap Javascripts in app/assets/javascripts/application.js:
> //= require jquery
> //= require bootstrap-sprockets


Notice it says "bootstrap-sprockets", not "bootstrap".

On Mon, Feb 9, 2015 at 9:37 AM, Артем Попов  wrote:

> Hello. I need some help with pipeline. I try build application with
> openlayer3. I compile ol.js. I put ol.js to /assets/javascripts/ . If I use
>
> <%= javascript_include_tag "application", "data-turbolinks-track" => true
> %>
>
> in  app\views\layouts\application.html.erb, I can see the map in my pages,
> but if i delete this line from file i can't see map. Why this happend?
>
> And another problem. I use bootstrap. I try create dropdown menu. I use:
>
> 
>
>
>
>  Account 
>
>
>
>
>
>  <%= link_to "Profile", current_user %>
>
>  <%= link_to "Settings", '#' %>
>
>  
>
>  
>
><%= link_to "Sign out", signout_path, method: "delete"
>> %>
>
>  
>
>
>
>  
>
>
>
>
> but menu don't work. I start rails server, then press Account and do
> nothing. I think don't work js path of bootstrap. But I add //= bootstrap
> in application.js . What I do wrong?
>
> Gemfile:
>
> source 'https://rubygems.org'
>
> # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
> gem 'rails', '4.0.2'
> gem 'bootstrap-sass', '2.3.2'
> gem 'bcrypt-ruby', '3.1.2'
>
> # Use PostgresSQL for records
> gem 'pg', '0.15.1'
>
> group :development, :test do
>   gem 'rspec-rails', '2.13.1'
> end
>
> group :test do
>   gem 'selenium-webdriver', '2.35.1'
>   gem 'capybara', '2.1.0'
>   gem 'factory_girl_rails', '4.2.1'
> end
>
> # Use SCSS for stylesheets
> gem 'sass-rails', '~> 4.0.0'
>
> # Use Uglifier as compressor for JavaScript assets
> gem 'uglifier', '>= 1.3.0'
>
> # Use CoffeeScript for .js.coffee assets and views
> gem 'coffee-rails', '~> 4.0.0'
>
> # See https://github.com/sstephenson/execjs#readme for more supported
> runtimes
> # gem 'therubyracer', platforms: :ruby
>
> # Use jquery as the JavaScript library
> gem 'jquery-rails'
>
> # Turbolinks makes following links in your web application faster. Read
> more: https://github.com/rails/turbolinks
> gem 'turbolinks'
>
> # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
> gem 'jbuilder', '~> 1.2'
>
> group :doc do
>   # bundle exec rake doc:rails generates the API under doc/api.
>   gem 'sdoc', require: false
> end
>
> group :production do
>   gem 'rails_12factor', '0.0.2'
> end
>
> # Use ActiveModel has_secure_password
> # gem 'bcrypt-ruby', '~> 3.1.2'
>
> # Use unicorn as the app server
> # gem 'unicorn'
>
> # Use Capistrano for deployment
> # gem 'capistrano', group: :development
>
> # Use debugger
> # gem 'debugger', group: [:development, :test]
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/0550d6e3-be63-43a0-abd6-8a0e4c49d0b7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t_YmzORi20QgzOh0r4Huc0KPMGtSo9XnccS7CQ80ido0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Don't work JavaScript pipeline. Need help. =(

2015-02-09 Thread Артем Попов
Hello. I need some help with pipeline. I try build application with 
openlayer3. I compile ol.js. I put ol.js to /assets/javascripts/ . If I use 

<%= javascript_include_tag "application", "data-turbolinks-track" => true %>

in  app\views\layouts\application.html.erb, I can see the map in my pages, 
but if i delete this line from file i can't see map. Why this happend?

And another problem. I use bootstrap. I try create dropdown menu. I use:



   

 Account 

   

   

 <%= link_to "Profile", current_user %>

 <%= link_to "Settings", '#' %>

 

 

   <%= link_to "Sign out", signout_path, method: "delete" %>

 

   

 




but menu don't work. I start rails server, then press Account and do 
nothing. I think don't work js path of bootstrap. But I add //= bootstrap 
in application.js . What I do wrong?

Gemfile:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
gem 'bootstrap-sass', '2.3.2'
gem 'bcrypt-ruby', '3.1.2'

# Use PostgresSQL for records
gem 'pg', '0.15.1'

group :development, :test do
  gem 'rspec-rails', '2.13.1'
end

group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
  gem 'factory_girl_rails', '4.2.1'
end

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported 
runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read 
more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

group :production do
  gem 'rails_12factor', '0.0.2'
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/0550d6e3-be63-43a0-abd6-8a0e4c49d0b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] ajax will_paginate

2015-02-09 Thread Melb01
Hi,
I have an index page with searchbox and with pagination, it worked well 
when I tried to make pagination with javascript, itworked for the first 
page but not the second
I think the problem is to pass the value of the search box to the script of 
pagination

here is my code:

index.hmtl.erb

<%= text_field_tag 'q', params['q']  %>
   
<%= render  'layouts/posts' %>

<% if !@posts.nil? %>
  <%= link_to 'Load More Posts', post_path(:page => @posts.next_page), 
:class => 'load-more-posts', :remote => true if @posts.next_page %>
 <% end %>
-
_posts.html.erb
<% if !@posts.nil? && @posts.size > 0  %>
<% @posts.each_with_index do |post| %>
<%= post.title %>
<%= post.body %>
<% end %>
 <% end %>
-


index.js.erb
$("#posts").append("<%= escape_javascript(render partial: "layouts/posts", 
:locals => { :posts => @posts }) %>");
---
post_controller.rb

*if !params[:q].nil?   *
  
  @posts = Post.find_with_q.paginate(:per_page => 10, :page =>  
params[:page])
  
  respond_to do |format|
format.html # index.html.erb
format.json { render json: @posts }
format.js
  end
end




The problem with this code is thatI can't go to the next page beause the 
params q is null with ajax call
when I delete the condition it works well
thank you fo the help

rgds,



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/b53cd303-5228-4885-814b-44eaade8c4c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Contributing in Rails organisation.

2015-02-09 Thread Javix


On Sunday, 8 February 2015 19:34:03 UTC+1, Puneet Agarwal wrote:
>
> Hi,
>
> I am using Ruby on Rails framework from last 1 year. I know how to build 
> website using this platform but now I am interested in contributing in Ruby 
> on Rails. I have seen bugs at github but contributing is much different 
> than using Rails. 
>
> Please help me out to get started . I have some new ideas in my mind which 
> should be there in this framework and I want to implement that so that i 
> can raise pull request for the same.
>
> Anyone please suggest right path to get started in contributing to Rails.
>
> Thanks. 
>

Take a look : 
http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#contributing-to-the-rails-documentation
 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/d86c64dd-9c97-42a8-af3b-0f63b5a87298%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.