Car make model dropdown web service [closed] - ruby-on-rails

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I once found a slick looking car make/model dropdown menu web service that advertised form helpers for Ruby on Rails, have subsequently been unable to find this again by Googling for it.... Anybody know the service I am talking about?

Edmunds provides this data for free through an API. You just have to sign-up to get an API key.
See documentation here:
http://developer.edmunds.com/api-documentation/vehicle/
Sign-up to get a key here: http://developer.edmunds.com/index.html
One example of making the call (many more examples given on their site):
https://api.edmunds.com/api/vehicle/v2/makes?fmt=json&api_key={your API key}
I was looking for exactly this kind of information for motorcycles. From what I can tell the API does not provide motorcycle data, but it seems to have just about everything for cars - Make, Model, Year, Trim, Style, even Maintenance Schedules.
With the json or xml data, you will have to roll your own drop down menus. Edmunds does provide some premade widgets, but they are pretty specific (e.g. return True Market Value), so there is a good chance they won't have exactly what you need.
http://developer.edmunds.com/widgets_and_apps/index.html

It doesn't include form helpers or anything, but here's a Ruby implementation that uses the KBB database to retrieve make/model info:
http://tektastic.com/2008/03/car-or-auto-make-model-year-database.html
I'd probably cron this outside of the app and update the db from time to time, then use collection_select in the app to construct the dropdowns as normal. You could also adapt it to use ActiveResource for live retrieval, but that seems excessive and perhaps bannable by KBB.

Related

Rails Create US State Graph [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a client that recently decided to add in-site surveys as part of an effort to better understand their user base. They are requesting an export of the survey data, which using Axlsx hasn't been to hard.
However, they've also requested a US Map Graph that displays which users live in which states - kind of like this one. We store the GeoIP of each user's City/State/ZIP, etc. so the data is there, but I'm not sure how I'd go about generating such a graph as part of the Excel output.
Any ideas about this being feasible to spit out in an Excel export? I haven't been able to find much information about creating them in Rails.
EDIT I just want to point out that the actual Excel export works great. What I'm struggling with is getting a graph to come out in a similar format as the above link. I'm already using the axlsx gem to export the data into Excel/creating various graphs. I haven't been able to figure out how to create a US State's graph with it though
You might want to take a look to the gem axlsx,
which is a spreadsheet generator for Ruby. They have a fair amount of examples.
Hope it helps.

Is there a Rails plugin to help me build an API for ember-data's RESTAdapter? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
So I'm going to embark on a project using ember-data, which tells me
The REST adapter assumes that the URLs and JSON associated with each model are conventional; this means that, if you follow the rules, you will not need to configure the adapter or write any code in order to get started.
Right-o! I want to do that. But what I would like to know is: is there a gem out there to help me build this REST API? If so, I could save time and use it instead of reinventing the wheel myself (and misinterpreting the conventions). Alternatively, I could set about developing such a framework as a separate gem!
So far I've seen
https://github.com/emberjs/ember-rails (seems focused on managing the javascript side and asset pipeline)
https://github.com/dgeb/ember_data_example (more an example app than a framework?)
and neither of them appear to be quite what I'm after. Am I wrong here?
(N.B. please consider me aware of the experimental nature of ember-data and the implications associated with it.)
I haven't tried it but this might be what you want: https://github.com/hedtek/ember-generators
If you're referring to the rails backend look at active model serializers (which I believe is a dependency with the ember-rails gem). And then for your controllers use respond_to :json and in your actions do respond_with <your_active_record_model_or_array_of_models>. Hope that helps.

Which is a better gem for indextank? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am using indextank with heroku. Which is a better gem to use, indextank or thinkingtank? I looked at the documentation, and tutorials for both,and it seems like thinkingtank is easier to use. A related/follow up question: what are the advantages/disadvantages of each?
It depends on what you're doing. If you are writing a simple app that's not based on ActiveRecord, the indextank client lets you add and search content without storing anything within your app. An example: if you are fetching tweets, you could index them directly without having a data model on your side. It's more "low level", so to speak.
If you are using ActiveRecord or another ORM, you should take a look at Tanker, it's more actively developed than ThinkingTank:
https://github.com/kidpollo/tanker
Hope this answers your question, if not please come chat with us at http://indextank.com (chat widget on the main page) and we'll be happy to help!
As Diego said, Tanker does seem like it has much going for it. Alternatively you could use IndexTanked:
https://github.com/zencoder/index-tanked
We wrote this library to power search on zencoder.com. Documentation is non-existant so far, but is coming.
One important feature included in IndexTanked, that was a necessity for us, was fault-tolerance. IndexTanked includes configurable fallback methods for use in case of failure to index, delete from the index, or search. Additionally, it limits calls to indextank by checking if the indexed fields have changed on updates. You can even obtain which fields we're checking against so you can select the minimum viable fields to be indexed when needed.
You can drop the author, Adam, a line at adam#zencoder.com if you have an questions (perfectly reasonable with the lack of docs).

meta tag parsing in Rails [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I was looking for something to help me parse general meta-tags from websites similar to this github project I found for open graph data. Here's a demo app.
Basically, I'd like to be able to have a user input a URL from a news site and have it retrieve from that the Title, Desc, etc., leaving as little work possible for the user. Before I go roll my own I was wondering if there was a current project / gem that exists similar to the project above? (as it only works with open graph and not general meta-tags)
I also noticed that facebook's linter does this as well even without open graph specific tags.
I would recommend the Nokogiri gem. It is an HTML, XML, etc. parser so you can use it to parse pages on your own. The nice thing about this approach is that it affords you the most flexibility for your specific use case. You can use the gem to parse any meta and header tags as long as you can express them using XPath or CSS3 selectors.
You can also try this free (for most) Open Graph API that I built: http://www.opengraph.io/

Looking for a Rails plugin for modular wiki functionality [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
There are a few plugins that implement a traditional wiki (collection of stand-alone wiki pages in a flat namespace), including irwi and wiki_column. That's not what I want.
What I want is something modular, so I can add a wiki panel on any random page of my website, or have fields in several different models be "wikified" (editable by all with version history). In other words, I want embeddable wiki objects rather than a full-page wiki, and I want the wiki content blocks to be anonymous rather than named in a unified flat namespace, or associable with specific objects.
Is there anything like that?
To wikify content is rather easy, so here some thoughts to it:
Have a look at the Railscast: Markdown with Redcarpet which explains how to wikify (that means style) content as HTML. That is one of the things you have to have to wikify pages. It is rather simple, and works like a charm.
Second, how will you link to "wiki content" without a name? For me, wiki is at least some content that is linked ...
To get a history, you should link your model object to versions of model. The Railscast #177 implements a wiki with versioning, perhaps that gives you enough hints to do it.
To add "a wiki panel" means then, that you have a (versioned) model WikiPanel, that may then used by other models. Hope my hints give you a starting point (even if it comes 20 months too late ...).
You could check out AdvaCMS, which features a wiki. AdvaCMS is built with Rails Engines (e.g. plugins). Check it out at http://adva-cms.org/wiki

Resources